aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/web.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-12-06 12:04:16 +0800
committerGitHub <noreply@github.com>2024-12-06 12:04:16 +0800
commitf7f68e4cc02ca57b841e20e0975b8926bf5c3722 (patch)
tree0a1ee205a4db859238752e9ed698a13dddfbf7e9 /routers/web/web.go
parentff14ada9655660af15d615b2fbd090b861686cd2 (diff)
downloadgitea-f7f68e4cc02ca57b841e20e0975b8926bf5c3722.tar.gz
gitea-f7f68e4cc02ca57b841e20e0975b8926bf5c3722.zip
Refactor RepoActionView.vue, add `::group::` support (#32713)
1. make it able to "force reload", then the previous pending request won't block the new request 2. make it support `::group::` 3. add some TS types (but there are still many variables untyped, this PR is large enough, the remaining types could be added in the future)
Diffstat (limited to 'routers/web/web.go')
-rw-r--r--routers/web/web.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/routers/web/web.go b/routers/web/web.go
index 6113a6457b..85e0fdc41e 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -1424,7 +1424,6 @@ func registerRoutes(m *web.Router) {
})
m.Post("/cancel", reqRepoActionsWriter, actions.Cancel)
m.Post("/approve", reqRepoActionsWriter, actions.Approve)
- m.Get("/artifacts", actions.ArtifactsView)
m.Get("/artifacts/{artifact_name}", actions.ArtifactsDownloadView)
m.Delete("/artifacts/{artifact_name}", actions.ArtifactsDeleteView)
m.Post("/rerun", reqRepoActionsWriter, actions.Rerun)
@@ -1626,9 +1625,12 @@ func registerRoutes(m *web.Router) {
}
if !setting.IsProd {
- m.Any("/devtest", devtest.List)
- m.Any("/devtest/fetch-action-test", devtest.FetchActionTest)
- m.Any("/devtest/{sub}", devtest.Tmpl)
+ m.Group("/devtest", func() {
+ m.Any("", devtest.List)
+ m.Any("/fetch-action-test", devtest.FetchActionTest)
+ m.Any("/{sub}", devtest.Tmpl)
+ m.Post("/actions-mock/runs/{run}/jobs/{job}", web.Bind(actions.ViewRequest{}), devtest.MockActionsRunsJobs)
+ })
}
m.NotFound(func(w http.ResponseWriter, req *http.Request) {