mirror of
https://github.com/gogs/gogs.git
synced 2026-05-07 01:07:15 +02:00
conf: overhaul server settings (#5928)
* conf: rename package * Requires Go 1.12 * Fix lint * Fix lint * Overhaul * db: fix tests * Save my work * Fix tests * Server.UnixSocketPermission * Server.LocalRootURL * SSH settings * Server.OfflineMode * Save my work * App.Version * Remove [server] STATIC_ROOT_PATH * Server.LandingURL
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
"gogs.io/gogs/internal/context"
|
||||
"gogs.io/gogs/internal/db"
|
||||
"gogs.io/gogs/internal/setting"
|
||||
"gogs.io/gogs/internal/conf"
|
||||
)
|
||||
|
||||
func ListEmails(c *context.APIContext) {
|
||||
@@ -39,7 +39,7 @@ func AddEmail(c *context.APIContext, form api.CreateEmailOption) {
|
||||
emails[i] = &db.EmailAddress{
|
||||
UID: c.User.ID,
|
||||
Email: form.Emails[i],
|
||||
IsActivated: !setting.Service.RegisterEmailConfirm,
|
||||
IsActivated: !conf.Service.RegisterEmailConfirm,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ import (
|
||||
repo2 "gogs.io/gogs/internal/route/api/v1/repo"
|
||||
"net/http"
|
||||
|
||||
"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"
|
||||
)
|
||||
|
||||
func GetUserByParamsName(c *context.APIContext, name string) *db.User {
|
||||
@@ -31,7 +31,7 @@ func GetUserByParams(c *context.APIContext) *db.User {
|
||||
}
|
||||
|
||||
func composePublicKeysAPILink() string {
|
||||
return setting.AppURL + "api/v1/user/keys/"
|
||||
return conf.Server.ExternalURL + "api/v1/user/keys/"
|
||||
}
|
||||
|
||||
func listPublicKeys(c *context.APIContext, uid int64) {
|
||||
|
||||
Reference in New Issue
Block a user