mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-27 21:03:56 +01:00
Use Get but not Post to get actions artifacts (#29734)
(cherry picked from commit 171d3d9a3c891d107001094b9118d93b0b00c02c) Conflicts: routers/web/web.go
This commit is contained in:
parent
d996c5d517
commit
fc8799f269
2 changed files with 3 additions and 3 deletions
|
@ -1413,7 +1413,7 @@ func registerRoutes(m *web.Route) {
|
||||||
})
|
})
|
||||||
m.Post("/cancel", reqRepoActionsWriter, actions.Cancel)
|
m.Post("/cancel", reqRepoActionsWriter, actions.Cancel)
|
||||||
m.Post("/approve", reqRepoActionsWriter, actions.Approve)
|
m.Post("/approve", reqRepoActionsWriter, actions.Approve)
|
||||||
m.Post("/artifacts", actions.ArtifactsView)
|
m.Get("/artifacts", actions.ArtifactsView)
|
||||||
m.Get("/artifacts/{artifact_name}", actions.ArtifactsDownloadView)
|
m.Get("/artifacts/{artifact_name}", actions.ArtifactsDownloadView)
|
||||||
m.Delete("/artifacts/{artifact_name}", reqRepoActionsWriter, actions.ArtifactsDeleteView)
|
m.Delete("/artifacts/{artifact_name}", reqRepoActionsWriter, actions.ArtifactsDeleteView)
|
||||||
m.Post("/rerun", reqRepoActionsWriter, actions.Rerun)
|
m.Post("/rerun", reqRepoActionsWriter, actions.Rerun)
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {createApp} from 'vue';
|
||||||
import {toggleElem} from '../utils/dom.js';
|
import {toggleElem} from '../utils/dom.js';
|
||||||
import {formatDatetime} from '../utils/time.js';
|
import {formatDatetime} from '../utils/time.js';
|
||||||
import {renderAnsi} from '../render/ansi.js';
|
import {renderAnsi} from '../render/ansi.js';
|
||||||
import {POST, DELETE} from '../modules/fetch.js';
|
import {GET, POST, DELETE} from '../modules/fetch.js';
|
||||||
|
|
||||||
const sfc = {
|
const sfc = {
|
||||||
name: 'RepoActionView',
|
name: 'RepoActionView',
|
||||||
|
@ -199,7 +199,7 @@ const sfc = {
|
||||||
},
|
},
|
||||||
|
|
||||||
async fetchArtifacts() {
|
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();
|
return await resp.json();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue