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.
This commit is contained in:
Christopher Baines 2023-05-22 17:25:44 +01:00
parent 54c7a1a880
commit 5f21458a8f
1 changed files with 18 additions and 1 deletions

View File

@ -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