mirror of https://github.com/go-gitea/gitea.git
Fix as suggested
This commit is contained in:
parent
f954f208ba
commit
86493c27cf
|
@ -50,7 +50,7 @@ func ListActionTasks(ctx *context.APIContext) {
|
|||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
// "409":
|
||||
// "$ref": "#/responses/error"
|
||||
// "$ref": "#/responses/conflict"
|
||||
// "422":
|
||||
// "$ref": "#/responses/validationError"
|
||||
|
||||
|
@ -68,7 +68,7 @@ func ListActionTasks(ctx *context.APIContext) {
|
|||
|
||||
res.Entries = make([]*api.ActionTask, len(tasks))
|
||||
for i := range tasks {
|
||||
convertedTask, err := convert.ToActionTask(ctx, ctx.Repo.Repository, tasks[i])
|
||||
convertedTask, err := convert.ToActionTask(ctx, tasks[i])
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "ToActionTask", err)
|
||||
return
|
||||
|
|
|
@ -196,7 +196,7 @@ func ToTag(repo *repo_model.Repository, t *git.Tag) *api.Tag {
|
|||
}
|
||||
|
||||
// ToActionTask convert a actions_model.ActionTask to an api.ActionTask
|
||||
func ToActionTask(ctx context.Context, repo *repo_model.Repository, t *actions_model.ActionTask) (*api.ActionTask, error) {
|
||||
func ToActionTask(ctx context.Context, t *actions_model.ActionTask) (*api.ActionTask, error) {
|
||||
if err := t.LoadAttributes(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue