http: Add route for /admin.

* src/cuirass/http.scm (url-handler): Handle /admin route.
This commit is contained in:
Ricardo Wurmus 2019-10-30 13:00:14 +01:00
parent 5ffb2c3089
commit 647f3961fa
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 6 additions and 0 deletions

View File

@ -284,6 +284,12 @@ Hydra format."
"Cuirass [Admin]"
(specifications-table (db-get-specifications) 'admin)
'())))
(('GET "admin")
(respond-html (html-page
"Cuirass [Admin]"
`(ul (li (a (@ (href "/admin/specifications"))
"Edit specifications")))
'())))
(('GET (or "jobsets" "specifications") . rest)
(respond-json (object->json-string
(list->vector (db-get-specifications)))))