2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/data-service.git synced 2023-12-14 03:23:03 +01:00

Fix the JSON output for the derivation history page

This commit is contained in:
Christopher Baines 2019-11-26 07:17:24 +00:00
parent 32e1fee7ea
commit af1324855e
2 changed files with 17 additions and 17 deletions

View file

@ -124,22 +124,22 @@
mime-types)
((application/json)
(render-json
`((versions . ,(list->vector
(map (match-lambda
((package-version derivation-file-name
first-guix-revision-commit
first-datetime
last-guix-revision-commit
last-datetime)
`((version . ,package-version)
(derivation . ,derivation-file-name)
(first_revision
. ((commit . ,first-guix-revision-commit)
(datetime . ,first-datetime)))
(last_revision
. ((commit . ,last-guix-revision-commit)
(datetime . ,last-datetime))))))
package-versions))))))
`((derivations . ,(list->vector
(map (match-lambda
((package-version derivation-file-name
first-guix-revision-commit
first-datetime
last-guix-revision-commit
last-datetime)
`((version . ,package-version)
(derivation . ,derivation-file-name)
(first_revision
. ((commit . ,first-guix-revision-commit)
(datetime . ,first-datetime)))
(last_revision
. ((commit . ,last-guix-revision-commit)
(datetime . ,last-datetime))))))
package-derivations))))))
(else
(render-html
#:sxml (view-branch-package-derivations

View file

@ -318,7 +318,7 @@
"/repository/" git-repository-id
"/branch/" branch-name
"/package/" package-name
".json")))
"/derivation-history.json")))
"View JSON")
(h1 (@ (style "white-space: nowrap;"))
(samp ,package-name))))