aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/notify/repo.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-05-20 22:08:52 +0800
committerGitHub <noreply@github.com>2022-05-20 22:08:52 +0800
commitfd7d83ace60258acf7139c4c787aa8af75b7ba8c (patch)
tree50038348ec10485f72344f3ac80324e04abc1283 /routers/api/v1/notify/repo.go
parentd81e31ad7826a81fc7139f329f250594610a274b (diff)
downloadgitea-fd7d83ace60258acf7139c4c787aa8af75b7ba8c.tar.gz
gitea-fd7d83ace60258acf7139c4c787aa8af75b7ba8c.zip
Move almost all functions' parameter db.Engine to context.Context (#19748)
* Move almost all functions' parameter db.Engine to context.Context * remove some unnecessary wrap functions
Diffstat (limited to 'routers/api/v1/notify/repo.go')
-rw-r--r--routers/api/v1/notify/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/notify/repo.go b/routers/api/v1/notify/repo.go
index 0f6b90b05d..4e9dd806de 100644
--- a/routers/api/v1/notify/repo.go
+++ b/routers/api/v1/notify/repo.go
@@ -115,7 +115,7 @@ func ListRepoNotifications(ctx *context.APIContext) {
return
}
- nl, err := models.GetNotifications(opts)
+ nl, err := models.GetNotifications(ctx, opts)
if err != nil {
ctx.InternalServerError(err)
return
@@ -203,7 +203,7 @@ func ReadRepoNotifications(ctx *context.APIContext) {
opts.Status = statusStringsToNotificationStatuses(statuses, []string{"unread"})
log.Error("%v", opts.Status)
}
- nl, err := models.GetNotifications(opts)
+ nl, err := models.GetNotifications(ctx, opts)
if err != nil {
ctx.InternalServerError(err)
return