|
|
@ -1181,13 +1181,13 @@ func Routes() *web.Route { |
|
|
|
Delete(reqToken(), reqRepoWriter(unit.TypeReleases), repo.DeleteReleaseByTag) |
|
|
|
Delete(reqToken(), reqRepoWriter(unit.TypeReleases), repo.DeleteReleaseByTag) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, reqRepoReader(unit.TypeReleases)) |
|
|
|
}, reqRepoReader(unit.TypeReleases)) |
|
|
|
m.Post("/mirror-sync", reqToken(), reqRepoWriter(unit.TypeCode), repo.MirrorSync) |
|
|
|
m.Post("/mirror-sync", reqToken(), reqRepoWriter(unit.TypeCode), mustNotBeArchived, repo.MirrorSync) |
|
|
|
m.Post("/push_mirrors-sync", reqAdmin(), reqToken(), repo.PushMirrorSync) |
|
|
|
m.Post("/push_mirrors-sync", reqAdmin(), reqToken(), mustNotBeArchived, repo.PushMirrorSync) |
|
|
|
m.Group("/push_mirrors", func() { |
|
|
|
m.Group("/push_mirrors", func() { |
|
|
|
m.Combo("").Get(repo.ListPushMirrors). |
|
|
|
m.Combo("").Get(repo.ListPushMirrors). |
|
|
|
Post(bind(api.CreatePushMirrorOption{}), repo.AddPushMirror) |
|
|
|
Post(mustNotBeArchived, bind(api.CreatePushMirrorOption{}), repo.AddPushMirror) |
|
|
|
m.Combo("/{name}"). |
|
|
|
m.Combo("/{name}"). |
|
|
|
Delete(repo.DeletePushMirrorByRemoteName). |
|
|
|
Delete(mustNotBeArchived, repo.DeletePushMirrorByRemoteName). |
|
|
|
Get(repo.GetPushMirrorByName) |
|
|
|
Get(repo.GetPushMirrorByName) |
|
|
|
}, reqAdmin(), reqToken()) |
|
|
|
}, reqAdmin(), reqToken()) |
|
|
|
|
|
|
|
|
|
|
|