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": []
}
],
"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": [
"text/plain"
"application/json"
],
"tags": [
"v16.7.2"

View File

@@ -284,9 +284,9 @@
"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": [
"text/plain"
"application/json"
],
"tags": [
"v16.7.2"

View File

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

View File

@@ -157,15 +157,15 @@ func (p *ConfigHandler) Set(c echo.Context) error {
// Reload will 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
// @ID config-3-reload
// @Produce plain
// @Success 200 {string} string "OK"
// @Produce json
// @Success 200 {string} string
// @Security ApiKeyAuth
// @Router /api/v3/config/reload [get]
func (p *ConfigHandler) Reload(c echo.Context) error {
p.store.Reload()
return c.String(http.StatusOK, "OK")
return c.JSON(http.StatusOK, "OK")
}