diff options
Diffstat (limited to 'routers/user/setting.go')
-rw-r--r-- | routers/user/setting.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go index a540f054f8..8f778acd0d 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -56,7 +56,7 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateProfileForm) { } else if err = models.ChangeUserName(ctx.User, form.UserName); err != nil { if err == models.ErrUserNameIllegal { ctx.Flash.Error(ctx.Tr("form.illegal_username")) - ctx.Redirect(setting.AppRootSubUrl + "/user/settings") + ctx.Redirect(setting.AppSubUrl + "/user/settings") return } else { ctx.Handle(500, "ChangeUserName", err) @@ -79,7 +79,7 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateProfileForm) { } log.Trace("User setting updated: %s", ctx.User.Name) ctx.Flash.Success(ctx.Tr("settings.update_profile_success")) - ctx.Redirect(setting.AppRootSubUrl + "/user/settings") + ctx.Redirect(setting.AppSubUrl + "/user/settings") } func SettingsPassword(ctx *middleware.Context) { @@ -120,7 +120,7 @@ func SettingsPasswordPost(ctx *middleware.Context, form auth.ChangePasswordForm) ctx.Flash.Success(ctx.Tr("settings.change_password_success")) } - ctx.Redirect(setting.AppRootSubUrl + "/user/settings/password") + ctx.Redirect(setting.AppSubUrl + "/user/settings/password") } func SettingsSSHKeys(ctx *middleware.Context) { @@ -161,7 +161,7 @@ func SettingsSSHKeysPost(ctx *middleware.Context, form auth.AddSSHKeyForm) { ctx.Handle(500, "DeletePublicKey", err) } else { log.Trace("SSH key deleted: %s", ctx.User.Name) - ctx.Redirect(setting.AppRootSubUrl + "/user/settings/ssh") + ctx.Redirect(setting.AppSubUrl + "/user/settings/ssh") } return } @@ -178,7 +178,7 @@ func SettingsSSHKeysPost(ctx *middleware.Context, form auth.AddSSHKeyForm) { if ok, err := models.CheckPublicKeyString(cleanContent); !ok { ctx.Flash.Error(ctx.Tr("form.invalid_ssh_key", err.Error())) - ctx.Redirect(setting.AppRootSubUrl + "/user/settings/ssh") + ctx.Redirect(setting.AppSubUrl + "/user/settings/ssh") return } @@ -197,7 +197,7 @@ func SettingsSSHKeysPost(ctx *middleware.Context, form auth.AddSSHKeyForm) { } else { log.Trace("SSH key added: %s", ctx.User.Name) ctx.Flash.Success(ctx.Tr("settings.add_key_success")) - ctx.Redirect(setting.AppRootSubUrl + "/user/settings/ssh") + ctx.Redirect(setting.AppSubUrl + "/user/settings/ssh") return } } @@ -218,7 +218,7 @@ func SettingsSocial(ctx *middleware.Context) { return } ctx.Flash.Success(ctx.Tr("settings.unbind_success")) - ctx.Redirect(setting.AppRootSubUrl + "/user/settings/social") + ctx.Redirect(setting.AppSubUrl + "/user/settings/social") return } @@ -249,13 +249,13 @@ func SettingsDelete(ctx *middleware.Context) { switch err { case models.ErrUserOwnRepos: ctx.Flash.Error(ctx.Tr("form.still_own_repo")) - ctx.Redirect(setting.AppRootSubUrl + "/user/settings/delete") + ctx.Redirect(setting.AppSubUrl + "/user/settings/delete") default: ctx.Handle(500, "DeleteUser", err) } } else { log.Trace("Account deleted: %s", ctx.User.Name) - ctx.Redirect(setting.AppRootSubUrl + "/") + ctx.Redirect(setting.AppSubUrl + "/") } return } |