summaryrefslogtreecommitdiff
path: root/fussy.lisp
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2023-05-26 08:55:49 -0700
committercolin <colin@cicadas.surf>2023-05-26 08:55:49 -0700
commit2b2b02c47455e90c90a833da4be7db32cab5a64d (patch)
tree9f967a3933301f88ab25364b47702c484ff10787 /fussy.lisp
parent660092480b858c2f34cc9c947105361ade233ddb (diff)
Param parser for search terms
Diffstat (limited to 'fussy.lisp')
-rw-r--r--fussy.lisp8
1 files changed, 5 insertions, 3 deletions
diff --git a/fussy.lisp b/fussy.lisp
index 7416378..4f20643 100644
--- a/fussy.lisp
+++ b/fussy.lisp
@@ -567,12 +567,14 @@ h1 {
(defun a-string (s) s)
-(lzb:defendpoint* :get "/" ((page an-integer) (terms a-string)) ()
+(defun a-search-query (terms)
+ "Parses a space separated list for search terms and returns a list."
+ (when terms (str:split-omit-nulls #\space terms)))
+
+(lzb:defendpoint* :get "/" ((page an-integer) (terms a-search-query)) ()
"The landing page"
(let* ((page
(or page 0))
- (terms
- (when terms (str:split-omit-nulls #\space terms)))
(all-themes
(if terms
(search-themes terms :sort-by (complement #'package-version<=))