about summary refs log tree commit diff
path: root/src/pronouns/web.clj
diff options
context:
space:
mode:
authorMorgan Astra <m@morganastra.me>2016-08-07 03:04:39 -0700
committerMorgan Astra <m@morganastra.me>2016-08-07 03:04:39 -0700
commitf0f6c207daea6efff6422e0a79fa388198fc9d4d (patch)
tree0026ea96f5d05c9402a53949fb6b8f831bb43917 /src/pronouns/web.clj
parentc3687318b1e435981c4190a941173ee7ed346d8c (diff)
add experimental support for multiple pronoun sets
Diffstat (limited to 'src/pronouns/web.clj')
-rw-r--r--src/pronouns/web.clj10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj
index 23ac603..cb5e6c9 100644
--- a/src/pronouns/web.clj
+++ b/src/pronouns/web.clj
@@ -6,8 +6,7 @@
             [clojure.string :as s]
             [ring.middleware.logger :as logger]
             [ring.middleware.stacktrace :as trace]
-            [ring.middleware.session :as session]
-            [ring.middleware.session.cookie :as cookie]
+            [ring.middleware.params :as params]
             [ring.adapter.jetty :as jetty]
             [environ.core :refer [env]]
             [pronouns.util :as u]
@@ -23,7 +22,7 @@
         :headers {"Content-Type" "text/html"}
         :body (pages/front pronouns-table)})
 
-  (GET "/pronouns.css" {params :params}
+  (GET "/pronouns.css" []
      {:status 200
      :headers {"Content-Type" "text/css"}
      :body (slurp (io/resource "pronouns.css"))})
@@ -31,7 +30,7 @@
   (GET "/*" {params :params}
        {:status 200
         :headers {"Content-Type" "text/html"}
-        :body (pages/pronouns (:* params) pronouns-table)})
+        :body (pages/pronouns params pronouns-table)})
 
   (ANY "*" []
        (route/not-found (slurp (io/resource "404.html")))))
@@ -48,7 +47,8 @@
   (-> app-routes
       logger/wrap-with-logger
       wrap-error-page
-      trace/wrap-stacktrace))
+      trace/wrap-stacktrace
+      params/wrap-params))
 
 (defn -main []
   (let [port (Integer. (:port env