mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Move clearlabels from models to issue service (#8326)
* move clearlabels from models to issue service * improve code * Apply suggestions from code review Co-Authored-By: zeripath <art27@cantab.net>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user