diff options
-rw-r--r-- | src/pronouns/pages.clj | 6 | ||||
-rw-r--r-- | src/pronouns/web.clj | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index e629329..8922234 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -225,14 +225,14 @@ (format-fn pronouns) (not-found-fn path)))) -(defn format-pronoun-json [& pronouns] +(defn format-pronoun-json [pronouns] (json/write-str pronouns)) (defn not-found-json [] (json/write-str {:error "Not found"})) -(defn pronouns-json [path pronouns-table] +(defn pronouns-json [params] (pronouns params format-pronoun-json not-found-json)) -(defn pronouns-html [path pronouns-table] +(defn pronouns-html [params] (pronouns params format-pronoun-examples not-found)) diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj index 6321198..6ef3dd3 100644 --- a/src/pronouns/web.clj +++ b/src/pronouns/web.clj @@ -51,10 +51,10 @@ (if (= "application/json" (s/lower-case (get headers "accept"))) {:status 200 :headers {"Content-Type" "application/json"} - :body (pages/pronouns-json params pronouns-table)} + :body (pages/pronouns-json params)} {:status 200 :headers {"Content-Type" "text/html"} - :body (pages/pronouns params pronouns-table)})) + :body (pages/pronouns params)})) (ANY "*" [] (route/not-found (slurp (io/resource "404.html"))))) |