aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/web
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-05-22 17:34:39 +0100
committerChristopher Baines <mail@cbaines.net>2023-05-22 17:34:39 +0100
commit68850065d79ba05dad7201c3ed22f5e2e32680b7 (patch)
tree700e68719a7e6030fc35b96590cbf69c88cfab6e /guix-data-service/web
parent5f21458a8f5319448762fef61f17b7414e7905c7 (diff)
downloaddata-service-68850065d79ba05dad7201c3ed22f5e2e32680b7.tar
data-service-68850065d79ba05dad7201c3ed22f5e2e32680b7.tar.gz
Extend the invalid parameter handling for more types
Diffstat (limited to 'guix-data-service/web')
-rw-r--r--guix-data-service/web/compare/controller.scm21
1 files changed, 12 insertions, 9 deletions
diff --git a/guix-data-service/web/compare/controller.scm b/guix-data-service/web/compare/controller.scm
index 20ee3b9..366a0bd 100644
--- a/guix-data-service/web/compare/controller.scm
+++ b/guix-data-service/web/compare/controller.scm
@@ -657,15 +657,18 @@
((name . val)
(cons
name
- (if (invalid-query-parameter? val)
- `((invalid
- . ,(with-output-to-string
- (lambda ()
- (sxml->html
- (invalid-query-parameter-message
- val)))))
- (value . ,(invalid-query-parameter-value val)))
- val))))
+ (cond
+ ((invalid-query-parameter? val)
+ `((invalid
+ . ,(with-output-to-string
+ (lambda ()
+ (sxml->html
+ (invalid-query-parameter-message
+ val)))))
+ (value . ,(invalid-query-parameter-value val))))
+ ((list? val)
+ (list->vector val))
+ (else val)))))
query-parameters)))))
(else
(letpar& ((systems