mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-02 22:57:50 +08:00
Move unit into models/unit/ (#17576)
* Move unit into models/unit/ * Rename unit.UnitType as unit.Type
This commit is contained in:
@ -9,6 +9,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/models/unit"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
||||
@ -262,10 +263,10 @@ func createOrUpdateIssueNotifications(e db.Engine, issueID, commentID, notificat
|
||||
|
||||
return err
|
||||
}
|
||||
if issue.IsPull && !issue.Repo.checkUnitUser(e, user, UnitTypePullRequests) {
|
||||
if issue.IsPull && !issue.Repo.checkUnitUser(e, user, unit.TypePullRequests) {
|
||||
continue
|
||||
}
|
||||
if !issue.IsPull && !issue.Repo.checkUnitUser(e, user, UnitTypeIssues) {
|
||||
if !issue.IsPull && !issue.Repo.checkUnitUser(e, user, unit.TypeIssues) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user