aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/misc/settings.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-06-04 20:06:24 +0200
committerGitHub <noreply@github.com>2020-06-04 19:06:24 +0100
commit2c5b3c72e8ebdf94ac764267fa78e4a0c5e93dc6 (patch)
tree89051bec5978313d00c7f96f3ceef67f06f3c6d3 /routers/api/v1/misc/settings.go
parent0cb22121f4709dc1f5c863af53618c31302714e2 (diff)
downloadgitea-2c5b3c72e8ebdf94ac764267fa78e4a0c5e93dc6.tar.gz
gitea-2c5b3c72e8ebdf94ac764267fa78e4a0c5e93dc6.zip
Fix bug with globally disabling mirror (#11760)
Ensure we return after `ctx.Error(...)`
Diffstat (limited to 'routers/api/v1/misc/settings.go')
-rw-r--r--routers/api/v1/misc/settings.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/api/v1/misc/settings.go b/routers/api/v1/misc/settings.go
index 11c7eef726..e9493050ca 100644
--- a/routers/api/v1/misc/settings.go
+++ b/routers/api/v1/misc/settings.go
@@ -5,6 +5,8 @@
package misc
import (
+ "net/http"
+
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
)
@@ -19,5 +21,5 @@ func SettingGetsAllowedReactions(ctx *context.APIContext) {
// responses:
// "200":
// "$ref": "#/responses/StringSlice"
- ctx.JSON(200, setting.UI.Reactions)
+ ctx.JSON(http.StatusOK, setting.UI.Reactions)
}