diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/misc/settings.go | 4 | ||||
-rw-r--r-- | routers/api/v1/repo/migrate.go | 1 |
2 files changed, 4 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) } diff --git a/routers/api/v1/repo/migrate.go b/routers/api/v1/repo/migrate.go index 43b5a7db30..fa4b7366e8 100644 --- a/routers/api/v1/repo/migrate.go +++ b/routers/api/v1/repo/migrate.go @@ -115,6 +115,7 @@ func Migrate(ctx *context.APIContext, form auth.MigrateRepoForm) { if form.Mirror && setting.Repository.DisableMirrors { ctx.Error(http.StatusForbidden, "MirrorsGlobalDisabled", fmt.Errorf("the site administrator has disabled mirrors")) + return } var opts = migrations.MigrateOptions{ |