diff options
author | JakobDev <jakobdev@gmx.de> | 2023-09-15 08:13:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 06:13:19 +0000 |
commit | c548dde205244a39a26ba98377c0f5cc11da7041 (patch) | |
tree | f9d9e1185609703e320ed07fd2ff3f95dbdcc230 /services/issue | |
parent | f8a109440655b77e8554e1744e31bf52a7c63df7 (diff) | |
download | gitea-c548dde205244a39a26ba98377c0f5cc11da7041.tar.gz gitea-c548dde205244a39a26ba98377c0f5cc11da7041.zip |
More refactoring of `db.DefaultContext` (#27083)
Next step of #27065
Diffstat (limited to 'services/issue')
-rw-r--r-- | services/issue/content.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/services/issue/content.go b/services/issue/content.go index cda11dbb18..41f1bfefe8 100644 --- a/services/issue/content.go +++ b/services/issue/content.go @@ -4,21 +4,22 @@ package issue import ( - "code.gitea.io/gitea/models/db" + "context" + issues_model "code.gitea.io/gitea/models/issues" user_model "code.gitea.io/gitea/models/user" notify_service "code.gitea.io/gitea/services/notify" ) // ChangeContent changes issue content, as the given user. -func ChangeContent(issue *issues_model.Issue, doer *user_model.User, content string) (err error) { +func ChangeContent(ctx context.Context, issue *issues_model.Issue, doer *user_model.User, content string) (err error) { oldContent := issue.Content if err := issues_model.ChangeIssueContent(issue, doer, content); err != nil { return err } - notify_service.IssueChangeContent(db.DefaultContext, doer, issue, oldContent) + notify_service.IssueChangeContent(ctx, doer, issue, oldContent) return nil } |