aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-08-20 21:50:21 -0700
committercolin <colin@cicadas.surf>2024-08-20 21:50:21 -0700
commita5aa15df43cb35bd8bc102bcded881cbdf079309 (patch)
tree8f0127bafe7317e47b143d4592cab240b509c36e
parent18dd5aface1c3f21a3c2c1d5e35a59279212a4f2 (diff)
Fix: allow variables in to defendpoint route parts
-rw-r--r--src/defendpoint.lisp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/defendpoint.lisp b/src/defendpoint.lisp
index 16f33a8..72c536e 100644
--- a/src/defendpoint.lisp
+++ b/src/defendpoint.lisp
@@ -10,6 +10,8 @@ PART is either
(KEYWORD STRING)
(KEYWORD STRING FUNCTION-NAME)"
(or (stringp part)
+ (and (symbolp part)
+ (not (keywordp part))) ; for variables
(and (listp part)
(or (and (= 2 (length part))
(do>
@@ -87,7 +89,8 @@ PART is either
(reduce #'union supers :key #'class-slot-names :initial-value nil)))
(route-parts
(loop :for part :in pathspec
- :when (stringp part)
+ :when (or (stringp part)
+ (and (symbolp part) (not (keywordp part))))
:collect part
:else
:collect (second part)))