Skip to content

Commit 1b5be81

Browse files
committed
UPDATE
1 parent 51b328e commit 1b5be81

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

routers/web/web.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ func registerWebRoutes(m *web.Router) {
14471447
})
14481448
m.Post("/cancel", reqRepoActionsWriter, actions.Cancel)
14491449
m.Post("/approve", reqRepoActionsWriter, actions.Approve)
1450-
m.Delete("/delete", reqRepoActionsWriter, actions.Delete)
1450+
m.Post("/delete", reqRepoActionsWriter, actions.Delete)
14511451
m.Get("/artifacts/{artifact_name}", actions.ArtifactsDownloadView)
14521452
m.Delete("/artifacts/{artifact_name}", reqRepoActionsWriter, actions.ArtifactsDeleteView)
14531453
m.Post("/rerun", reqRepoActionsWriter, actions.Rerun)

tests/integration/actions_delete_run_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ jobs:
152152
})
153153
session.MakeRequest(t, req, http.StatusOK)
154154

155-
req = NewRequestWithValues(t, "DELETE", fmt.Sprintf("/%s/%s/actions/runs/%s/delete", user2.Name, apiRepo.Name, runIndex), map[string]string{
155+
req = NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/actions/runs/%s/delete", user2.Name, apiRepo.Name, runIndex), map[string]string{
156156
"_csrf": GetUserCSRFToken(t, session),
157157
})
158158
session.MakeRequest(t, req, http.StatusOK)
159159

160-
req = NewRequestWithValues(t, "DELETE", fmt.Sprintf("/%s/%s/actions/runs/%s/delete", user2.Name, apiRepo.Name, runIndex), map[string]string{
160+
req = NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/actions/runs/%s/delete", user2.Name, apiRepo.Name, runIndex), map[string]string{
161161
"_csrf": GetUserCSRFToken(t, session),
162162
})
163163
session.MakeRequest(t, req, http.StatusNotFound)

0 commit comments

Comments
 (0)