diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/repo/issue_label.go | 3 | ||||
-rw-r--r-- | routers/repo/issue_label.go | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go index e66bc35e90..7bd76c24c2 100644 --- a/routers/api/v1/repo/issue_label.go +++ b/routers/api/v1/repo/issue_label.go @@ -9,6 +9,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" api "code.gitea.io/gitea/modules/structs" + issue_service "code.gitea.io/gitea/services/issue" ) // ListIssueLabels list all the labels of an issue @@ -314,7 +315,7 @@ func ClearIssueLabels(ctx *context.APIContext) { return } - if err := issue.ClearLabels(ctx.User); err != nil { + if err := issue_service.ClearLabels(issue, ctx.User); err != nil { ctx.Error(500, "ClearLabels", err) return } diff --git a/routers/repo/issue_label.go b/routers/repo/issue_label.go index 452a0a4c0c..53c37e2e97 100644 --- a/routers/repo/issue_label.go +++ b/routers/repo/issue_label.go @@ -10,6 +10,7 @@ import ( "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" + issue_service "code.gitea.io/gitea/services/issue" ) const ( @@ -132,7 +133,7 @@ func UpdateIssueLabel(ctx *context.Context) { switch action := ctx.Query("action"); action { case "clear": for _, issue := range issues { - if err := issue.ClearLabels(ctx.User); err != nil { + if err := issue_service.ClearLabels(issue, ctx.User); err != nil { ctx.ServerError("ClearLabels", err) return } |