diff options
-rw-r--r-- | src/pronouns/pages.clj | 9 | ||||
-rw-r--r-- | src/pronouns/web.clj | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index bdcd9d6..8aed689 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -135,7 +135,8 @@ (apply format-pronouns pronouns) (not-found)))) -(defn pronouns [path pronouns-table accept] - (if (= accept :json) - (pronouns-page path pronouns-table format-pronoun-json not-found-json) - (pronouns-page path pronouns-table format-pronoun-examples not-found))) +(defn pronouns [path pronouns-table] + (pronouns-page path pronouns-table format-pronoun-examples not-found)) + +(defn pronouns-json [path pronouns-table] + (pronouns-page path pronouns-table format-pronoun-json not-found-json)) diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj index bf717eb..5af441f 100644 --- a/src/pronouns/web.clj +++ b/src/pronouns/web.clj @@ -32,10 +32,10 @@ (if (= "application/json" (.toLowerCase (get headers "accept"))) {:status 200 :headers {"Content-Type" "application/json"} - :body (pages/pronouns (:* params) pronouns-table :json)} + :body (pages/pronouns-json (:* params) pronouns-table)} {:status 200 :headers {"Content-Type" "text/html"} - :body (pages/pronouns (:* params) pronouns-table :html)})) + :body (pages/pronouns (:* params) pronouns-table)})) (ANY "*" [] (route/not-found (slurp (io/resource "404.html"))))) |