diff options
Diffstat (limited to 'api.lisp')
-rw-r--r-- | api.lisp | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1,8 +1,8 @@ ;;;; api.lisp -- http routes for dnd -(in-package :dnd.api) +(in-package :dnd) -(lzb:provision-app () +(lzb:provision-app (api) :title "Dungeons & Deadlines" :version "0.1.0" :prefix "/api" @@ -13,11 +13,13 @@ (declare (ignore ignore)) t) -(defendpoint api :get "/heroes" () + + +(defendpoint* :get "/hall-of-legends" ((filter-by identity)) (:auth t) "Get a list of heros sorted by renown" (json:to-json - (list :|heroes| - (sort (copy-seq (db:store-objects-with-class 'hero)) - #'> - :key #'renown)))) + (list :heroes + (sort (copy-seq (db:store-objects-with-class 'hero)) + #'> + :key #'renown)))) |