diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-10-19 17:48:29 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-10-19 12:48:29 +0300 |
commit | 280f4bebbf5883eef94d8a84b21575393ae5e0e1 (patch) | |
tree | 578594a27dbe25185ec5ce70f692e2f392d9b947 /routers/repo/issue_label.go | |
parent | 240f46a4220d9b8d38d084dca4ff47d442c12f9c (diff) | |
download | gitea-280f4bebbf5883eef94d8a84b21575393ae5e0e1.tar.gz gitea-280f4bebbf5883eef94d8a84b21575393ae5e0e1.zip |
Move issue label operations to issue service package (#8553)
* Move issue label operations to issue service package
* fix test
* fix fmt
Diffstat (limited to 'routers/repo/issue_label.go')
-rw-r--r-- | routers/repo/issue_label.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/issue_label.go b/routers/repo/issue_label.go index 53c37e2e97..02568f77a6 100644 --- a/routers/repo/issue_label.go +++ b/routers/repo/issue_label.go @@ -162,14 +162,14 @@ func UpdateIssueLabel(ctx *context.Context) { if action == "attach" { for _, issue := range issues { - if err = issue.AddLabel(ctx.User, label); err != nil { + if err = issue_service.AddLabel(issue, ctx.User, label); err != nil { ctx.ServerError("AddLabel", err) return } } } else { for _, issue := range issues { - if err = issue.RemoveLabel(ctx.User, label); err != nil { + if err = issue_service.RemoveLabel(issue, ctx.User, label); err != nil { ctx.ServerError("RemoveLabel", err) return } |