mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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
This commit is contained in:
@@ -71,7 +71,7 @@ func mailIssueCommentToParticipants(ctx *mailCommentContext, mentions []*user_mo
|
||||
unfiltered = append(unfiltered, ids...)
|
||||
|
||||
// =========== Issue watchers ===========
|
||||
ids, err = models.GetIssueWatchersIDs(ctx.Issue.ID, true)
|
||||
ids, err = models.GetIssueWatchersIDs(ctx, ctx.Issue.ID, true)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetIssueWatchersIDs(%d): %v", ctx.Issue.ID, err)
|
||||
}
|
||||
@@ -98,7 +98,7 @@ func mailIssueCommentToParticipants(ctx *mailCommentContext, mentions []*user_mo
|
||||
}
|
||||
|
||||
// Avoid mailing explicit unwatched
|
||||
ids, err = models.GetIssueWatchersIDs(ctx.Issue.ID, false)
|
||||
ids, err = models.GetIssueWatchersIDs(ctx, ctx.Issue.ID, false)
|
||||
if err != nil {
|
||||
return fmt.Errorf("GetIssueWatchersIDs(%d): %v", ctx.Issue.ID, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user