mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Clean oauth code
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/mailer"
|
||||
"github.com/gogits/gogs/modules/middleware"
|
||||
"github.com/gogits/gogs/modules/social"
|
||||
)
|
||||
|
||||
// Check run mode(Default of martini is Dev).
|
||||
@@ -36,6 +37,11 @@ func checkRunMode() {
|
||||
log.Info("Run Mode: %s", strings.Title(martini.Env))
|
||||
}
|
||||
|
||||
func NewServices() {
|
||||
base.NewBaseServices()
|
||||
social.NewOauthService()
|
||||
}
|
||||
|
||||
// GlobalInit is for global configuration reload-able.
|
||||
func GlobalInit() {
|
||||
base.NewConfigContext()
|
||||
@@ -52,7 +58,7 @@ func GlobalInit() {
|
||||
models.HasEngine = true
|
||||
cron.NewCronContext()
|
||||
}
|
||||
base.NewServices()
|
||||
NewServices()
|
||||
checkRunMode()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user