summaryrefslogtreecommitdiff
path: root/api.lisp
diff options
context:
space:
mode:
authorGrant Shoshin Shangreaux <shoshin@cicadas.surf>2023-01-07 09:39:46 -0600
committerGrant Shoshin Shangreaux <shoshin@cicadas.surf>2023-01-07 09:39:46 -0600
commit9a040d4e78ab07eb9c482a40042f2ba92d2a8e3b (patch)
tree5286e5283238995a1500a2a5bc71cbd24255bc46 /api.lisp
parentee7919667832660ef05939823af5516eb9344e16 (diff)
Revert "Add: serialization for Heroes and dnd.api package"
This reverts commit 72bcf7e66269af588d9daa9064de23d257cbd053.
Diffstat (limited to 'api.lisp')
-rw-r--r--api.lisp16
1 files changed, 9 insertions, 7 deletions
diff --git a/api.lisp b/api.lisp
index ca60f21..cecacb4 100644
--- a/api.lisp
+++ b/api.lisp
@@ -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))))