aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/issue_label.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/web/repo/issue_label.go
parenta1b2a118123e0abd1d4737f4a6c0cf56d15eff57 (diff)
downloadgitea-f91dbbba98c841f11d99be998ed5dd98122a457c.tar.gz
gitea-f91dbbba98c841f11d99be998ed5dd98122a457c.zip
Next round of `db.DefaultContext` refactor (#27089)
Part of #27065
Diffstat (limited to 'routers/web/repo/issue_label.go')
-rw-r--r--routers/web/repo/issue_label.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/repo/issue_label.go b/routers/web/repo/issue_label.go
index 257610d3af..2d129490f5 100644
--- a/routers/web/repo/issue_label.go
+++ b/routers/web/repo/issue_label.go
@@ -145,7 +145,7 @@ func UpdateLabel(ctx *context.Context) {
l.Color = form.Color
l.SetArchived(form.IsArchived)
- if err := issues_model.UpdateLabel(l); err != nil {
+ if err := issues_model.UpdateLabel(ctx, l); err != nil {
ctx.ServerError("UpdateLabel", err)
return
}
@@ -154,7 +154,7 @@ func UpdateLabel(ctx *context.Context) {
// DeleteLabel delete a label
func DeleteLabel(ctx *context.Context) {
- if err := issues_model.DeleteLabel(ctx.Repo.Repository.ID, ctx.FormInt64("id")); err != nil {
+ if err := issues_model.DeleteLabel(ctx, ctx.Repo.Repository.ID, ctx.FormInt64("id")); err != nil {
ctx.Flash.Error("DeleteLabel: " + err.Error())
} else {
ctx.Flash.Success(ctx.Tr("repo.issues.label_deletion_success"))
@@ -173,7 +173,7 @@ func UpdateIssueLabel(ctx *context.Context) {
switch action := ctx.FormString("action"); action {
case "clear":
for _, issue := range issues {
- if err := issue_service.ClearLabels(issue, ctx.Doer); err != nil {
+ if err := issue_service.ClearLabels(ctx, issue, ctx.Doer); err != nil {
ctx.ServerError("ClearLabels", err)
return
}
@@ -208,14 +208,14 @@ func UpdateIssueLabel(ctx *context.Context) {
if action == "attach" {
for _, issue := range issues {
- if err = issue_service.AddLabel(issue, ctx.Doer, label); err != nil {
+ if err = issue_service.AddLabel(ctx, issue, ctx.Doer, label); err != nil {
ctx.ServerError("AddLabel", err)
return
}
}
} else {
for _, issue := range issues {
- if err = issue_service.RemoveLabel(issue, ctx.Doer, label); err != nil {
+ if err = issue_service.RemoveLabel(ctx, issue, ctx.Doer, label); err != nil {
ctx.ServerError("RemoveLabel", err)
return
}