guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Have render-compare/package-derivations provide i


From: Christopher Baines
Subject: branch master updated: Have render-compare/package-derivations provide invalid param info
Date: Mon, 22 May 2023 12:28:14 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository data-service.

The following commit(s) were added to refs/heads/master by this push:
     new 5f21458  Have render-compare/package-derivations provide invalid param 
info
5f21458 is described below

commit 5f21458a8f5319448762fef61f17b7414e7905c7
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Mon May 22 17:25:44 2023 +0100

    Have render-compare/package-derivations provide invalid param info
    
    So that this can be used by the qa-frontpage.
    
    This should be improved and generalised.
---
 guix-data-service/web/compare/controller.scm | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/guix-data-service/web/compare/controller.scm 
b/guix-data-service/web/compare/controller.scm
index 9aec025..20ee3b9 100644
--- a/guix-data-service/web/compare/controller.scm
+++ b/guix-data-service/web/compare/controller.scm
@@ -649,7 +649,24 @@
              mime-types)
         ((application/json)
          (render-json
-          '((error . "invalid query"))))
+          `((error . "invalid query")
+            (query_parameters
+             .
+             ,(map
+               (match-lambda
+                 ((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))))
+               query-parameters)))))
         (else
          (letpar& ((systems
                     (with-thread-postgresql-connection



reply via email to

[Prev in Thread] Current Thread [Next in Thread]