From d150af49370a2d70710a50c6cc2e38bf1a72868f Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Fri, 16 Nov 2018 18:39:29 -0800 Subject: Clean up some issues from the merge conflict to make API work --- src/pronouns/pages.clj | 6 +++--- 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"))))) -- cgit