|
|
|
@@ -12,6 +12,8 @@ import ( |
|
|
|
"text/template" |
|
|
|
"time" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/routers/image" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/routers/authentication" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/modules/cloudbrain" |
|
|
|
@@ -529,6 +531,7 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
m.Get("", admin.Images) |
|
|
|
m.Get("/data", repo.GetAllImages) |
|
|
|
}) |
|
|
|
m.Put("/image/:id/action/:action", image.Action) |
|
|
|
|
|
|
|
m.Group("/^:configType(hooks|system-hooks)$", func() { |
|
|
|
m.Get("", admin.DefaultOrSystemWebhooks) |
|
|
|
@@ -976,11 +979,12 @@ func RegisterRoutes(m *macaron.Macaron) { |
|
|
|
m.Group("/:username/:reponame", func() { |
|
|
|
m.Post("/topics", repo.TopicsPost) |
|
|
|
}, context.RepoAssignment(), context.RepoMustNotBeArchived(), reqRepoAdmin) |
|
|
|
|
|
|
|
m.Group("/image/:id", func() { |
|
|
|
|
|
|
|
m.Group("/image/:id", func() { |
|
|
|
m.Get("/:from", cloudbrain.AdminOrImageCreaterRight, repo.CloudBrainImageEdit) |
|
|
|
m.Post("", cloudbrain.AdminOrImageCreaterRight, bindIgnErr(auth.EditImageCloudBrainForm{}), repo.CloudBrainImageEditPost) |
|
|
|
m.Delete("", cloudbrain.AdminOrImageCreaterRight, repo.CloudBrainImageDelete) |
|
|
|
m.Put("action/:action", reqSignIn, image.Action) |
|
|
|
}) |
|
|
|
m.Group("/:username/:reponame", func() { |
|
|
|
m.Group("", func() { |
|
|
|
|