diff options
Diffstat (limited to 'src/pronouns')
-rw-r--r-- | src/pronouns/pages.clj | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 8922234..a90cc85 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -226,10 +226,17 @@ (not-found-fn path)))) (defn format-pronoun-json [pronouns] - (json/write-str pronouns)) - -(defn not-found-json [] - (json/write-str {:error "Not found"})) + (json/write-str {:api-version "0.1" + :status :ok + :pronouns (first pronouns) + :alt-pronouns (rest pronouns)})) + +(defn not-found-json [_] + (json/write-str {:api-version "0.1" + :status :not-found + :error "Not found" + :pronouns [] + :alt-pronouns []})) (defn pronouns-json [params] (pronouns params format-pronoun-json not-found-json)) |