Skip to content

Commit bbb7017

Browse files
committed
fixup
1 parent d50358f commit bbb7017

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

routers/api/v1/repo/action.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ func GetArtifactsOfRun(ctx *context.APIContext) {
614614
// "$ref": "#/responses/notFound"
615615

616616
repoID := ctx.Repo.Repository.ID
617-
artifactName := ctx.PathParam("artifact_name")
617+
artifactName := ctx.Req.URL.Query().Get("name")
618618

619619
runID := ctx.PathParamInt64("run")
620620

@@ -675,7 +675,7 @@ func GetArtifacts(ctx *context.APIContext) {
675675
// "$ref": "#/responses/notFound"
676676

677677
repoID := ctx.Repo.Repository.ID
678-
artifactName := ctx.PathParam("artifact_name")
678+
artifactName := ctx.Req.URL.Query().Get("name")
679679

680680
artifacts, total, err := db.FindAndCount[actions_model.ActionArtifact](ctx, actions_model.FindArtifactsOptions{
681681
RepoID: repoID,
@@ -863,7 +863,7 @@ func DownloadArtifactRaw(ctx *context.APIContext) {
863863
if actions.IsArtifactV4(art) {
864864
err := actions.DownloadArtifactV4(ctx.Base, art)
865865
if err != nil {
866-
ctx.Error(http.StatusInternalServerError, "artifact has expired", fmt.Errorf("artifact has expired"))
866+
ctx.Error(http.StatusInternalServerError, err.Error(), err)
867867
return
868868
}
869869
}

0 commit comments

Comments
 (0)