From 26585f3cc99cdc14389cc7bb11686da2c7205a6c Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 29 Jun 2024 08:09:46 -0700 Subject: Add: optional name to ps client generatiors --- src/client/ps/generate.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/ps/generate.lisp') 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) -- cgit v1.2.3