summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/repo.go')
-rw-r--r--routers/api/v1/repo/repo.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index c838ba7271..513e7a37b3 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -20,6 +20,7 @@ import (
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/routers/api/v1/convert"
+ mirror_service "code.gitea.io/gitea/services/mirror"
)
var searchOrderByMap = map[string]map[string]models.SearchOrderBy{
@@ -869,6 +870,7 @@ func MirrorSync(ctx *context.APIContext) {
ctx.Error(403, "MirrorSync", "Must have write access")
}
- go models.MirrorQueue.Add(repo.ID)
+ mirror_service.StartToMirror(repo.ID)
+
ctx.Status(200)
}