diff options
author | colin <colin@cicadas.surf> | 2023-03-06 20:06:19 -0800 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2023-03-06 20:06:19 -0800 |
commit | eea0da373349349b4d25dd4bc116a9c9eb04fb98 (patch) | |
tree | b54c75e1a4007bfcd538887c0b52cd0ba2c5e4d1 /src/endpoints.lisp | |
parent | 187fce76197031dba1112bd6023b41166f039f3e (diff) |
Add: basic page stub to view an adventure
Diffstat (limited to 'src/endpoints.lisp')
-rw-r--r-- | src/endpoints.lisp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/endpoints.lisp b/src/endpoints.lisp index 288f39e..f1151cf 100644 --- a/src/endpoints.lisp +++ b/src/endpoints.lisp @@ -149,4 +149,14 @@ functions in url parameters in endpoint definitions." :description description :seers possible-seers))))))) +(defun an-adventure-with-id (id) + (let ((object (object-with-uid (string-upcase id)))) + (unless (typep object 'adventure) + (lzb:http-err 404)) + object)) + +(defendpoint* :get "/adventure/:adventure an-adventure-with-id:/:title:" () () + (with-session (player) + (render (page-render-mode) + adventure))) ;; for now, render raw adventure. |