aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/setting/setting.go
diff options
context:
space:
mode:
authorChongyi Zheng <git@zcy.dev>2023-08-26 22:24:45 -0400
committerGitHub <noreply@github.com>2023-08-27 10:24:45 +0800
commit43652746f2929aeb53ec1e575c3691050755a0b5 (patch)
tree8f2f05ca05fc6ad1b5c557c77a95f17c0f2381bc /routers/web/repo/setting/setting.go
parent37b3ba22a1dcf88cf4bfa4a7861703c8a5701f5c (diff)
downloadgitea-43652746f2929aeb53ec1e575c3691050755a0b5.tar.gz
gitea-43652746f2929aeb53ec1e575c3691050755a0b5.zip
Move `modules/mirror` to `services` (#26737)
To solve the cyclic imports in a better way Closes #20261
Diffstat (limited to 'routers/web/repo/setting/setting.go')
-rw-r--r--routers/web/repo/setting/setting.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/routers/web/repo/setting/setting.go b/routers/web/repo/setting/setting.go
index 71c1939f29..af09e240d5 100644
--- a/routers/web/repo/setting/setting.go
+++ b/routers/web/repo/setting/setting.go
@@ -24,7 +24,6 @@ import (
"code.gitea.io/gitea/modules/indexer/stats"
"code.gitea.io/gitea/modules/lfs"
"code.gitea.io/gitea/modules/log"
- mirror_module "code.gitea.io/gitea/modules/mirror"
repo_module "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/structs"
@@ -277,7 +276,7 @@ func SettingsPost(ctx *context.Context) {
return
}
- mirror_module.AddPullMirrorToQueue(repo.ID)
+ mirror_service.AddPullMirrorToQueue(repo.ID)
ctx.Flash.Info(ctx.Tr("repo.settings.mirror_sync_in_progress"))
ctx.Redirect(repo.Link() + "/settings")
@@ -294,7 +293,7 @@ func SettingsPost(ctx *context.Context) {
return
}
- mirror_module.AddPushMirrorToQueue(m.ID)
+ mirror_service.AddPushMirrorToQueue(m.ID)
ctx.Flash.Info(ctx.Tr("repo.settings.mirror_sync_in_progress"))
ctx.Redirect(repo.Link() + "/settings")
@@ -332,7 +331,7 @@ func SettingsPost(ctx *context.Context) {
// If we observed its implementation in the context of `push-mirror-sync` where it
// is evident that pushing to the queue is necessary for updates.
// So, there are updates within the given interval, it is necessary to update the queue accordingly.
- mirror_module.AddPushMirrorToQueue(m.ID)
+ mirror_service.AddPushMirrorToQueue(m.ID)
ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success"))
ctx.Redirect(repo.Link() + "/settings")