Fix /config/reload return type

This commit is contained in:
Ingo Oppermann
2023-01-19 11:46:45 +01:00
parent f0ff3b89c1
commit 311defb27c
4 changed files with 10 additions and 10 deletions

View File

@@ -292,9 +292,9 @@ const docTemplate = `{
"ApiKeyAuth": [] "ApiKeyAuth": []
} }
], ],
"description": "Reload the currently active configuration. This will trigger a restart of the Restreamer.", "description": "Reload the currently active configuration. This will trigger a restart of the Core.",
"produces": [ "produces": [
"text/plain" "application/json"
], ],
"tags": [ "tags": [
"v16.7.2" "v16.7.2"

View File

@@ -284,9 +284,9 @@
"ApiKeyAuth": [] "ApiKeyAuth": []
} }
], ],
"description": "Reload the currently active configuration. This will trigger a restart of the Restreamer.", "description": "Reload the currently active configuration. This will trigger a restart of the Core.",
"produces": [ "produces": [
"text/plain" "application/json"
], ],
"tags": [ "tags": [
"v16.7.2" "v16.7.2"

View File

@@ -2077,10 +2077,10 @@ paths:
/api/v3/config/reload: /api/v3/config/reload:
get: get:
description: Reload the currently active configuration. This will trigger a description: Reload the currently active configuration. This will trigger a
restart of the Restreamer. restart of the Core.
operationId: config-3-reload operationId: config-3-reload
produces: produces:
- text/plain - application/json
responses: responses:
"200": "200":
description: OK description: OK

View File

@@ -157,15 +157,15 @@ func (p *ConfigHandler) Set(c echo.Context) error {
// Reload will reload the currently active configuration // Reload will reload the currently active configuration
// @Summary Reload the currently active configuration // @Summary Reload the currently active configuration
// @Description Reload the currently active configuration. This will trigger a restart of the Restreamer. // @Description Reload the currently active configuration. This will trigger a restart of the Core.
// @Tags v16.7.2 // @Tags v16.7.2
// @ID config-3-reload // @ID config-3-reload
// @Produce plain // @Produce json
// @Success 200 {string} string "OK" // @Success 200 {string} string
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @Router /api/v3/config/reload [get] // @Router /api/v3/config/reload [get]
func (p *ConfigHandler) Reload(c echo.Context) error { func (p *ConfigHandler) Reload(c echo.Context) error {
p.store.Reload() p.store.Reload()
return c.String(http.StatusOK, "OK") return c.JSON(http.StatusOK, "OK")
} }