add GET /config

This commit is contained in:
Mikaël Cluseau
2026-07-01 11:05:26 +02:00
parent 38ad620759
commit 9aa942c99d
2 changed files with 17 additions and 0 deletions
+3
View File
@@ -73,6 +73,9 @@ func registerWS(rest *restful.Container) {
Doc("Sign a download set"))
// - configs API
ws.Route(ws.GET("/config").To(wsFetchConfig).
Produces(mime.JSON, mime.YAML).
Doc("Fetch the current configuration"))
ws.Route(ws.POST("/configs").To(wsUploadConfig).
Consumes(mime.YAML, mime.JSON).Param(ws.BodyParameter("config", "The new full configuration")).
Produces(mime.JSON).Writes(true).