mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-07-22 17:18:33 +00:00
fix: job list response to avoid wrapped body. (#7050)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7050 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Jaime merino <cobak78@gmail.com> Co-committed-by: Jaime merino <cobak78@gmail.com>
This commit is contained in:
parent
768f5a9255
commit
a4778fc970
6 changed files with 24 additions and 25 deletions
|
@ -34,13 +34,6 @@ func GetRegistrationToken(ctx *context.APIContext, ownerID, repoID int64) {
|
|||
ctx.JSON(http.StatusOK, RegistrationToken{Token: token.Token})
|
||||
}
|
||||
|
||||
// RunJobList is a list of action run jobs
|
||||
// swagger:response RunJobList
|
||||
type RunJobList struct {
|
||||
// in:body
|
||||
Body []*structs.ActionRunJob `json:"body"`
|
||||
}
|
||||
|
||||
func GetActionRunJobs(ctx *context.APIContext, ownerID, repoID int64) {
|
||||
labels := strings.Split(ctx.FormTrim("labels"), ",")
|
||||
|
||||
|
@ -54,8 +47,7 @@ func GetActionRunJobs(ctx *context.APIContext, ownerID, repoID int64) {
|
|||
return
|
||||
}
|
||||
|
||||
res := new(RunJobList)
|
||||
res.Body = fromRunJobModelToResponse(total, labels)
|
||||
res := fromRunJobModelToResponse(total, labels)
|
||||
|
||||
ctx.JSON(http.StatusOK, res)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue