Skip to content

Commit

Permalink
Use Get but not Post to get actions artifacts (#29734) (#29737)
Browse files Browse the repository at this point in the history
backport #29734
  • Loading branch information
lunny authored Mar 12, 2024
1 parent 4bfc43e commit 8c31456
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion routers/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,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.Post("/rerun", reqRepoActionsWriter, actions.Rerun)
})
Expand Down
4 changes: 2 additions & 2 deletions web_src/js/components/RepoActionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {createApp} from 'vue';
import {toggleElem} from '../utils/dom.js';
import {getCurrentLocale} from '../utils.js';
import {renderAnsi} from '../render/ansi.js';
import {POST} from '../modules/fetch.js';
import {GET, POST} from '../modules/fetch.js';
const sfc = {
name: 'RepoActionView',
Expand Down Expand Up @@ -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();
},
Expand Down

0 comments on commit 8c31456

Please sign in to comment.