forked from forgejo/forgejo
Clean oauth code
This commit is contained in:
parent
8c266f2df5
commit
4b9b8024ba
17 changed files with 547 additions and 748 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue