diff options
Diffstat (limited to 'routers/admin')
-rw-r--r-- | routers/admin/admin.go | 6 | ||||
-rw-r--r-- | routers/admin/auths.go | 8 | ||||
-rw-r--r-- | routers/admin/notice.go | 2 | ||||
-rw-r--r-- | routers/admin/repos.go | 2 | ||||
-rw-r--r-- | routers/admin/users.go | 10 |
5 files changed, 14 insertions, 14 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go index c7aa7f02..69ca4877 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -165,7 +165,7 @@ func Dashboard(ctx *context.Context) { } else { ctx.Flash.Success(success) } - ctx.Redirect(setting.AppSubUrl + "/admin") + ctx.Redirect(setting.AppSubURL + "/admin") return } @@ -185,7 +185,7 @@ func SendTestMail(ctx *context.Context) { ctx.Flash.Info(ctx.Tr("admin.config.test_mail_sent", email)) } - ctx.Redirect(setting.AppSubUrl + "/admin/config") + ctx.Redirect(setting.AppSubURL + "/admin/config") } func Config(ctx *context.Context) { @@ -193,7 +193,7 @@ func Config(ctx *context.Context) { ctx.Data["PageIsAdmin"] = true ctx.Data["PageIsAdminConfig"] = true - ctx.Data["AppUrl"] = setting.AppUrl + ctx.Data["AppURL"] = setting.AppURL ctx.Data["Domain"] = setting.Domain ctx.Data["OfflineMode"] = setting.OfflineMode ctx.Data["DisableRouterLog"] = setting.DisableRouterLog diff --git a/routers/admin/auths.go b/routers/admin/auths.go index 81a61957..532adb4f 100644 --- a/routers/admin/auths.go +++ b/routers/admin/auths.go @@ -163,7 +163,7 @@ func NewAuthSourcePost(ctx *context.Context, f form.Authentication) { log.Trace("Authentication created by admin(%s): %s", ctx.User.Name, f.Name) ctx.Flash.Success(ctx.Tr("admin.auths.new_success", f.Name)) - ctx.Redirect(setting.AppSubUrl + "/admin/auths") + ctx.Redirect(setting.AppSubURL + "/admin/auths") } func EditAuthSource(ctx *context.Context) { @@ -230,7 +230,7 @@ func EditAuthSourcePost(ctx *context.Context, f form.Authentication) { log.Trace("Authentication changed by admin(%s): %d", ctx.User.Name, source.ID) ctx.Flash.Success(ctx.Tr("admin.auths.update_success")) - ctx.Redirect(setting.AppSubUrl + "/admin/auths/" + com.ToStr(f.ID)) + ctx.Redirect(setting.AppSubURL + "/admin/auths/" + com.ToStr(f.ID)) } func DeleteAuthSource(ctx *context.Context) { @@ -247,7 +247,7 @@ func DeleteAuthSource(ctx *context.Context) { ctx.Flash.Error(fmt.Sprintf("DeleteSource: %v", err)) } ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubUrl + "/admin/auths/" + ctx.Params(":authid"), + "redirect": setting.AppSubURL + "/admin/auths/" + ctx.Params(":authid"), }) return } @@ -255,6 +255,6 @@ func DeleteAuthSource(ctx *context.Context) { ctx.Flash.Success(ctx.Tr("admin.auths.deletion_success")) ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubUrl + "/admin/auths", + "redirect": setting.AppSubURL + "/admin/auths", }) } diff --git a/routers/admin/notice.go b/routers/admin/notice.go index 4041a0fc..37f120bc 100644 --- a/routers/admin/notice.go +++ b/routers/admin/notice.go @@ -68,5 +68,5 @@ func EmptyNotices(ctx *context.Context) { log.Trace("System notices deleted by admin (%s): [start: %d]", ctx.User.Name, 0) ctx.Flash.Success(ctx.Tr("admin.notices.delete_success")) - ctx.Redirect(setting.AppSubUrl + "/admin/notices") + ctx.Redirect(setting.AppSubURL + "/admin/notices") } diff --git a/routers/admin/repos.go b/routers/admin/repos.go index 1cd0b749..b2691706 100644 --- a/routers/admin/repos.go +++ b/routers/admin/repos.go @@ -82,6 +82,6 @@ func DeleteRepo(ctx *context.Context) { ctx.Flash.Success(ctx.Tr("repo.settings.deletion_success")) ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubUrl + "/admin/repos?page=" + ctx.Query("page"), + "redirect": setting.AppSubURL + "/admin/repos?page=" + ctx.Query("page"), }) } diff --git a/routers/admin/users.go b/routers/admin/users.go index 7bb9ec77..4b8949c1 100644 --- a/routers/admin/users.go +++ b/routers/admin/users.go @@ -120,7 +120,7 @@ func NewUserPost(ctx *context.Context, f form.AdminCrateUser) { } ctx.Flash.Success(ctx.Tr("admin.users.new_success", u.Name)) - ctx.Redirect(setting.AppSubUrl + "/admin/users/" + com.ToStr(u.ID)) + ctx.Redirect(setting.AppSubURL + "/admin/users/" + com.ToStr(u.ID)) } func prepareUserInfo(ctx *context.Context) *models.User { @@ -226,7 +226,7 @@ func EditUserPost(ctx *context.Context, f form.AdminEditUser) { log.Trace("Account profile updated by admin (%s): %s", ctx.User.Name, u.Name) ctx.Flash.Success(ctx.Tr("admin.users.update_profile_success")) - ctx.Redirect(setting.AppSubUrl + "/admin/users/" + ctx.Params(":userid")) + ctx.Redirect(setting.AppSubURL + "/admin/users/" + ctx.Params(":userid")) } func DeleteUser(ctx *context.Context) { @@ -241,12 +241,12 @@ func DeleteUser(ctx *context.Context) { case models.IsErrUserOwnRepos(err): ctx.Flash.Error(ctx.Tr("admin.users.still_own_repo")) ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubUrl + "/admin/users/" + ctx.Params(":userid"), + "redirect": setting.AppSubURL + "/admin/users/" + ctx.Params(":userid"), }) case models.IsErrUserHasOrgs(err): ctx.Flash.Error(ctx.Tr("admin.users.still_has_org")) ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubUrl + "/admin/users/" + ctx.Params(":userid"), + "redirect": setting.AppSubURL + "/admin/users/" + ctx.Params(":userid"), }) default: ctx.Handle(500, "DeleteUser", err) @@ -257,6 +257,6 @@ func DeleteUser(ctx *context.Context) { ctx.Flash.Success(ctx.Tr("admin.users.deletion_success")) ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubUrl + "/admin/users", + "redirect": setting.AppSubURL + "/admin/users", }) } |