aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 44e0c290a0..e1478fa2aa 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -982,6 +982,15 @@ func Routes() *web.Route {
})
}, reqRepoReader(unit.TypeReleases))
m.Post("/mirror-sync", reqToken(), reqRepoWriter(unit.TypeCode), repo.MirrorSync)
+ m.Post("/push_mirrors-sync", reqAdmin(), repo.PushMirrorSync)
+ m.Group("/push_mirrors", func() {
+ m.Combo("").Get(repo.ListPushMirrors).
+ Post(bind(api.CreatePushMirrorOption{}), repo.AddPushMirror)
+ m.Combo("/{name}").
+ Delete(repo.DeletePushMirrorByRemoteName).
+ Get(repo.GetPushMirrorByName)
+ }, reqAdmin())
+
m.Get("/editorconfig/{filename}", context.ReferencesGitRepo(), context.RepoRefForAPI, reqRepoReader(unit.TypeCode), repo.GetEditorconfig)
m.Group("/pulls", func() {
m.Combo("").Get(repo.ListPullRequests).