Skip to content

Commit e88e4f4

Browse files
committed
Use Get but not Post to get actions artifacts (go-gitea#29734)
1 parent 4bfc43e commit e88e4f4

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
@@ -1360,7 +1360,7 @@ func registerRoutes(m *web.Route) {
13601360
})
13611361
m.Post("/cancel", reqRepoActionsWriter, actions.Cancel)
13621362
m.Post("/approve", reqRepoActionsWriter, actions.Approve)
1363-
m.Post("/artifacts", actions.ArtifactsView)
1363+
m.Get("/artifacts", actions.ArtifactsView)
13641364
m.Get("/artifacts/{artifact_name}", actions.ArtifactsDownloadView)
13651365
m.Post("/rerun", reqRepoActionsWriter, actions.Rerun)
13661366
})

web_src/js/components/RepoActionView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {createApp} from 'vue';
55
import {toggleElem} from '../utils/dom.js';
66
import {getCurrentLocale} from '../utils.js';
77
import {renderAnsi} from '../render/ansi.js';
8-
import {POST} from '../modules/fetch.js';
8+
import {GET, POST} from '../modules/fetch.js';
99
1010
const sfc = {
1111
name: 'RepoActionView',
@@ -196,7 +196,7 @@ const sfc = {
196196
},
197197
198198
async fetchArtifacts() {
199-
const resp = await POST(`${this.actionsURL}/runs/${this.runIndex}/artifacts`);
199+
const resp = await GET(`${this.actionsURL}/runs/${this.runIndex}/artifacts`);
200200
return await resp.json();
201201
},
202202

0 commit comments

Comments
 (0)