mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
This reverts commit 523751dc82
.
This commit is contained in:
@@ -915,21 +915,6 @@ func Routes() *web.Router {
|
||||
})
|
||||
}
|
||||
|
||||
addActionsWorkflowRoutes := func(
|
||||
m *web.Router,
|
||||
actw actions.WorkflowAPI,
|
||||
) {
|
||||
m.Group("/actions", func() {
|
||||
m.Group("/workflows", func() {
|
||||
m.Get("", reqToken(), actw.ListRepositoryWorkflows)
|
||||
m.Get("/{workflow_id}", reqToken(), actw.GetWorkflow)
|
||||
m.Put("/{workflow_id}/disable", reqToken(), reqRepoWriter(unit.TypeActions), actw.DisableWorkflow)
|
||||
m.Post("/{workflow_id}/dispatches", reqToken(), reqRepoWriter(unit.TypeActions), bind(api.CreateActionWorkflowDispatch{}), actw.DispatchWorkflow)
|
||||
m.Put("/{workflow_id}/enable", reqToken(), reqRepoWriter(unit.TypeActions), actw.EnableWorkflow)
|
||||
}, context.ReferencesGitRepo(), reqRepoReader(unit.TypeActions))
|
||||
})
|
||||
}
|
||||
|
||||
m.Group("", func() {
|
||||
// Miscellaneous (no scope required)
|
||||
if setting.API.EnableSwagger {
|
||||
@@ -1175,10 +1160,6 @@ func Routes() *web.Router {
|
||||
reqOwner(),
|
||||
repo.NewAction(),
|
||||
)
|
||||
addActionsWorkflowRoutes(
|
||||
m,
|
||||
repo.NewActionWorkflow(),
|
||||
)
|
||||
m.Group("/hooks/git", func() {
|
||||
m.Combo("").Get(repo.ListGitHooks)
|
||||
m.Group("/{id}", func() {
|
||||
|
Reference in New Issue
Block a user