refactor: use ctx in models

This commit is contained in:
Jason Song
2022-12-06 14:15:48 +08:00
parent c07d0c1768
commit 56368f3963
14 changed files with 87 additions and 165 deletions

View File

@@ -118,7 +118,7 @@ func List(ctx *context.Context) {
run.Repo = ctx.Repo.Repository
}
if err := runs.LoadTriggerUser(); err != nil {
if err := runs.LoadTriggerUser(ctx); err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return
}