Implement the JSON response for package substitute availability
This commit is contained in:
parent
e3062abf33
commit
ec3dba4894
1 changed files with 16 additions and 1 deletions
|
|
@ -619,7 +619,22 @@
|
||||||
mime-types)
|
mime-types)
|
||||||
((application/json)
|
((application/json)
|
||||||
(render-json
|
(render-json
|
||||||
'())) ; TODO
|
`((commit . ,commit-hash)
|
||||||
|
(substitute_servers
|
||||||
|
. ,(list->vector
|
||||||
|
(map (match-lambda
|
||||||
|
((build-server-id . data)
|
||||||
|
`((server . ((url . ,(assoc-ref build-server-urls
|
||||||
|
build-server-id))))
|
||||||
|
(availability
|
||||||
|
. ,(list->vector
|
||||||
|
(map (match-lambda
|
||||||
|
((system-and-target . data)
|
||||||
|
`((system . ,(assq-ref system-and-target 'system))
|
||||||
|
(target . ,(assq-ref system-and-target 'target))
|
||||||
|
,@data)))
|
||||||
|
data))))))
|
||||||
|
substitute-availability))))))
|
||||||
(else
|
(else
|
||||||
(render-html
|
(render-html
|
||||||
#:sxml (view-revision-package-substitute-availability
|
#:sxml (view-revision-package-substitute-availability
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue