1
0
Fork 0
forked from forgejo/forgejo

Clean oauth code

This commit is contained in:
Unknown 2014-04-13 18:12:07 -04:00
parent 8c266f2df5
commit 4b9b8024ba
17 changed files with 547 additions and 748 deletions

View file

@ -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()
}