Skip to content

Commit

Permalink
Use Get but not Post to get actions artifacts (#29734)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Mar 12, 2024
1 parent d8bd6f3 commit 171d3d9
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
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions web_src/js/components/RepoActionView.vue
Expand Up @@ -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',
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 171d3d9

Please sign in to comment.