diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-03-12 18:53:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-12 11:53:53 +0100 |
commit | 171d3d9a3c891d107001094b9118d93b0b00c02c (patch) | |
tree | a4e4cffc7e9f62b792dbd92d47ee832f097ddfd7 | |
parent | d8bd6f34f09bc9a6602bebb33bdc9e1f255a0d7c (diff) | |
download | gitea-171d3d9a3c891d107001094b9118d93b0b00c02c.tar.gz gitea-171d3d9a3c891d107001094b9118d93b0b00c02c.zip |
Use Get but not Post to get actions artifacts (#29734)
-rw-r--r-- | routers/web/web.go | 2 | ||||
-rw-r--r-- | web_src/js/components/RepoActionView.vue | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/routers/web/web.go b/routers/web/web.go index 8710f6e3e5..fc1432873f 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -1374,7 +1374,7 @@ func registerRoutes(m *web.Route) { }) m.Post("/cancel", reqRepoActionsWriter, actions.Cancel) m.Post("/approve", reqRepoActionsWriter, actions.Approve) - m.Post("/artifacts", actions.ArtifactsView) + 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) diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index de9625b143..9641431508 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -5,7 +5,7 @@ import {createApp} from 'vue'; import {toggleElem} from '../utils/dom.js'; import {formatDatetime} from '../utils/time.js'; import {renderAnsi} from '../render/ansi.js'; -import {POST, DELETE} from '../modules/fetch.js'; +import {GET, POST, DELETE} from '../modules/fetch.js'; const sfc = { name: 'RepoActionView', @@ -196,7 +196,7 @@ const sfc = { }, async fetchArtifacts() { - const resp = await POST(`${this.actionsURL}/runs/${this.runIndex}/artifacts`); + const resp = await GET(`${this.actionsURL}/runs/${this.runIndex}/artifacts`); return await resp.json(); }, |