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)
|
||||
((application/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
|
||||
(render-html
|
||||
#:sxml (view-revision-package-substitute-availability
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue