diff options
author | Morgan Astra <m@morganastra.me> | 2018-11-16 18:39:29 -0800 |
---|---|---|
committer | Morgan Astra <m@morganastra.me> | 2018-11-16 18:39:29 -0800 |
commit | d150af49370a2d70710a50c6cc2e38bf1a72868f (patch) | |
tree | 45aad7983113cff30e1b740fbe714d644c6e4827 /src | |
parent | c0303dc5802e51015a42f2d4c0fb5f540f95ba4e (diff) |
Clean up some issues from the merge conflict to make API work
Diffstat (limited to 'src')
-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"))))) |