aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/issue_subscription.go
diff options
context:
space:
mode:
authorJakobDev <jakobdev@gmx.de>2023-09-16 16:39:12 +0200
committerGitHub <noreply@github.com>2023-09-16 14:39:12 +0000
commitf91dbbba98c841f11d99be998ed5dd98122a457c (patch)
tree9c6c935ccf745c5a1716f1330922354809cd39e0 /routers/api/v1/repo/issue_subscription.go
parenta1b2a118123e0abd1d4737f4a6c0cf56d15eff57 (diff)
downloadgitea-f91dbbba98c841f11d99be998ed5dd98122a457c.tar.gz
gitea-f91dbbba98c841f11d99be998ed5dd98122a457c.zip
Next round of `db.DefaultContext` refactor (#27089)
Part of #27065
Diffstat (limited to 'routers/api/v1/repo/issue_subscription.go')
-rw-r--r--routers/api/v1/repo/issue_subscription.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/repo/issue_subscription.go b/routers/api/v1/repo/issue_subscription.go
index 1fec029465..ab9a037040 100644
--- a/routers/api/v1/repo/issue_subscription.go
+++ b/routers/api/v1/repo/issue_subscription.go
@@ -132,7 +132,7 @@ func setIssueSubscription(ctx *context.APIContext, watch bool) {
return
}
- current, err := issues_model.CheckIssueWatch(user, issue)
+ current, err := issues_model.CheckIssueWatch(ctx, user, issue)
if err != nil {
ctx.Error(http.StatusInternalServerError, "CheckIssueWatch", err)
return
@@ -145,7 +145,7 @@ func setIssueSubscription(ctx *context.APIContext, watch bool) {
}
// Update watch state
- if err := issues_model.CreateOrUpdateIssueWatch(user.ID, issue.ID, watch); err != nil {
+ if err := issues_model.CreateOrUpdateIssueWatch(ctx, user.ID, issue.ID, watch); err != nil {
ctx.Error(http.StatusInternalServerError, "CreateOrUpdateIssueWatch", err)
return
}
@@ -196,7 +196,7 @@ func CheckIssueSubscription(ctx *context.APIContext) {
return
}
- watching, err := issues_model.CheckIssueWatch(ctx.Doer, issue)
+ watching, err := issues_model.CheckIssueWatch(ctx, ctx.Doer, issue)
if err != nil {
ctx.InternalServerError(err)
return