diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-10 03:57:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 20:57:58 +0100 |
commit | 99b2858e628d92bba252be72def409af77af735b (patch) | |
tree | 56159cf10b271307911e6f01626c0c3efba789ab /models/repo_watch.go | |
parent | b6b1e716654fec3b16d245ef65cf42e57e1bb5b6 (diff) | |
download | gitea-99b2858e628d92bba252be72def409af77af735b.tar.gz gitea-99b2858e628d92bba252be72def409af77af735b.zip |
Move unit into models/unit/ (#17576)
* Move unit into models/unit/
* Rename unit.UnitType as unit.Type
Diffstat (limited to 'models/repo_watch.go')
-rw-r--r-- | models/repo_watch.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/models/repo_watch.go b/models/repo_watch.go index b37d47874e..55fb08a426 100644 --- a/models/repo_watch.go +++ b/models/repo_watch.go @@ -8,6 +8,7 @@ import ( "fmt" "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" ) @@ -245,9 +246,9 @@ func notifyWatchers(e db.Engine, actions ...*Action) error { permPR[i] = false continue } - permCode[i] = perm.CanRead(UnitTypeCode) - permIssue[i] = perm.CanRead(UnitTypeIssues) - permPR[i] = perm.CanRead(UnitTypePullRequests) + permCode[i] = perm.CanRead(unit.TypeCode) + permIssue[i] = perm.CanRead(unit.TypeIssues) + permPR[i] = perm.CanRead(unit.TypePullRequests) } } |