aboutsummaryrefslogtreecommitdiff
path: root/internal/route/org
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/org')
3 files changed, 8 insertions, 8 deletions
diff --git a/internal/route/org/members.go b/internal/route/org/members.go
index fc36bde1..fc22ad59 100644
--- a/internal/route/org/members.go
+++ b/internal/route/org/members.go
@@ -8,10 +8,10 @@ import (
"github.com/unknwon/com"
log "unknwon.dev/clog/v2"
+ "gogs.io/gogs/internal/conf"
"gogs.io/gogs/internal/context"
"gogs.io/gogs/internal/db"
"gogs.io/gogs/internal/db/errors"
- "gogs.io/gogs/internal/setting"
)
const (
@@ -87,7 +87,7 @@ func MembersAction(c *context.Context) {
if c.Params(":action") != "leave" {
c.Redirect(c.Org.OrgLink + "/members")
} else {
- c.Redirect(setting.AppSubURL + "/")
+ c.Redirect(conf.Server.Subpath + "/")
}
}
diff --git a/internal/route/org/org.go b/internal/route/org/org.go
index 13ec7a51..551dd3e8 100644
--- a/internal/route/org/org.go
+++ b/internal/route/org/org.go
@@ -7,10 +7,10 @@ package org
import (
log "unknwon.dev/clog/v2"
+ "gogs.io/gogs/internal/conf"
"gogs.io/gogs/internal/context"
"gogs.io/gogs/internal/db"
"gogs.io/gogs/internal/form"
- "gogs.io/gogs/internal/setting"
)
const (
@@ -52,5 +52,5 @@ func CreatePost(c *context.Context, f form.CreateOrg) {
}
log.Trace("Organization created: %s", org.Name)
- c.Redirect(setting.AppSubURL + "/org/" + f.OrgName + "/dashboard")
+ c.Redirect(conf.Server.Subpath + "/org/" + f.OrgName + "/dashboard")
}
diff --git a/internal/route/org/setting.go b/internal/route/org/setting.go
index 366a0f6b..aecd8643 100644
--- a/internal/route/org/setting.go
+++ b/internal/route/org/setting.go
@@ -9,12 +9,12 @@ import (
log "unknwon.dev/clog/v2"
+ "gogs.io/gogs/internal/conf"
"gogs.io/gogs/internal/context"
"gogs.io/gogs/internal/db"
"gogs.io/gogs/internal/db/errors"
"gogs.io/gogs/internal/form"
"gogs.io/gogs/internal/route/user"
- "gogs.io/gogs/internal/setting"
)
const (
@@ -63,7 +63,7 @@ func SettingsPost(c *context.Context, f form.UpdateOrgSetting) {
return
}
// reset c.org.OrgLink with new name
- c.Org.OrgLink = setting.AppSubURL + "/org/" + f.Name
+ c.Org.OrgLink = conf.Server.Subpath + "/org/" + f.Name
log.Trace("Organization name changed: %s -> %s", org.Name, f.Name)
}
// In case it's just a case change.
@@ -130,7 +130,7 @@ func SettingsDelete(c *context.Context) {
}
} else {
log.Trace("Organization deleted: %s", org.Name)
- c.Redirect(setting.AppSubURL + "/")
+ c.Redirect(conf.Server.Subpath + "/")
}
return
}
@@ -143,7 +143,7 @@ func Webhooks(c *context.Context) {
c.Data["PageIsSettingsHooks"] = true
c.Data["BaseLink"] = c.Org.OrgLink
c.Data["Description"] = c.Tr("org.settings.hooks_desc")
- c.Data["Types"] = setting.Webhook.Types
+ c.Data["Types"] = conf.Webhook.Types
ws, err := db.GetWebhooksByOrgID(c.Org.Organization.ID)
if err != nil {