aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-06-29 08:09:46 -0700
committercolin <colin@cicadas.surf>2024-06-29 08:09:46 -0700
commit26585f3cc99cdc14389cc7bb11686da2c7205a6c (patch)
tree5e881469687f473cdac88474643aeecf9c72ccec
parent245eafde829d0a79d8d8459c0cbcb71a01bcaf3a (diff)
Add: optional name to ps client generatiors
-rw-r--r--src/client/ps/generate.lisp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/ps/generate.lisp b/src/client/ps/generate.lisp
index f6f317b..d6a5aef 100644
--- a/src/client/ps/generate.lisp
+++ b/src/client/ps/generate.lisp
@@ -10,7 +10,7 @@
;; this function largely mirrors the implementation of construct-route-builder
-(defun generate (class)
+(defun generate (class &optional alt-name)
(when (symbolp class) (setf class (find-class class)))
(let*
@@ -46,7 +46,7 @@
:collect param
:when more
:collect "&")))))
- `(defun ,(class-name class) ,args
+ `(defun ,(or alt-name (class-name class)) ,args
(fetch (+ ,@parts ,@url-params)
(ps:create
method ,(string method)