From eea0da373349349b4d25dd4bc116a9c9eb04fb98 Mon Sep 17 00:00:00 2001 From: colin Date: Mon, 6 Mar 2023 20:06:19 -0800 Subject: Add: basic page stub to view an adventure --- src/endpoints.lisp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/endpoints.lisp') 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. -- cgit v1.2.3