aboutsummaryrefslogtreecommitdiffstats
path: root/routers/init.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-05-09 00:46:32 +0800
committerGitHub <noreply@github.com>2022-05-08 18:46:32 +0200
commit4ca1d7547a2c32cc65ca23d1a7698d1a8c921d65 (patch)
treefee132403adea441987ce25809c764e00fd962cd /routers/init.go
parentd4834071da9ce010fd4677ef339c598dd23dc130 (diff)
downloadgitea-4ca1d7547a2c32cc65ca23d1a7698d1a8c921d65.tar.gz
gitea-4ca1d7547a2c32cc65ca23d1a7698d1a8c921d65.zip
Move some helper files out of models (#19355)
* Move some helper files out of models * Some improvements Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'routers/init.go')
-rw-r--r--routers/init.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/routers/init.go b/routers/init.go
index 2e7fec86db..759945ce25 100644
--- a/routers/init.go
+++ b/routers/init.go
@@ -73,7 +73,7 @@ func mustInitCtx(ctx context.Context, fn func(ctx context.Context) error) {
func InitGitServices() {
setting.NewServices()
mustInit(storage.Init)
- mustInit(repo_service.NewContext)
+ mustInit(repo_service.Init)
}
func syncAppPathForGit(ctx context.Context) error {
@@ -116,7 +116,9 @@ func GlobalInitInstalled(ctx context.Context) {
// Setup i18n
translation.InitLocales()
- InitGitServices()
+ setting.NewServices()
+ mustInit(storage.Init)
+
mailer.NewContext()
mustInit(cache.NewContext)
notification.NewContext()
@@ -138,6 +140,7 @@ func GlobalInitInstalled(ctx context.Context) {
mustInit(oauth2.Init)
models.NewRepoContext()
+ mustInit(repo_service.Init)
// Booting long running goroutines.
cron.NewContext(ctx)