diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-03-29 14:29:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 14:29:02 +0800 |
commit | b06b9a056c0af751e576978f6ef3c914ee959b9c (patch) | |
tree | aa0d11413038baa5d47af65fd435665c698fe456 /models/user_heatmap.go | |
parent | d4c789dfc1c341413b77a2f21fe7339982102bed (diff) | |
download | gitea-b06b9a056c0af751e576978f6ef3c914ee959b9c.tar.gz gitea-b06b9a056c0af751e576978f6ef3c914ee959b9c.zip |
Move organization related structs into sub package (#18518)
* Move organization related structs into sub package
* Fix test
* Fix lint
* Move more functions into sub packages
* Fix bug
* Fix test
* Update models/organization/team_repo.go
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Apply suggestions from code review
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix fmt
* Follow suggestion from @Gusted
* Fix test
* Fix test
* Fix bug
* Use ctx but db.DefaultContext on routers
* Fix bug
* Fix bug
* fix bug
* Update models/organization/team_user.go
* Fix bug
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'models/user_heatmap.go')
-rw-r--r-- | models/user_heatmap.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/models/user_heatmap.go b/models/user_heatmap.go index f331a0c16b..e908837ae8 100644 --- a/models/user_heatmap.go +++ b/models/user_heatmap.go @@ -6,6 +6,7 @@ package models import ( "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/models/organization" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" @@ -23,11 +24,11 @@ func GetUserHeatmapDataByUser(user, doer *user_model.User) ([]*UserHeatmapData, } // GetUserHeatmapDataByUserTeam returns an array of UserHeatmapData -func GetUserHeatmapDataByUserTeam(user *user_model.User, team *Team, doer *user_model.User) ([]*UserHeatmapData, error) { +func GetUserHeatmapDataByUserTeam(user *user_model.User, team *organization.Team, doer *user_model.User) ([]*UserHeatmapData, error) { return getUserHeatmapData(user, team, doer) } -func getUserHeatmapData(user *user_model.User, team *Team, doer *user_model.User) ([]*UserHeatmapData, error) { +func getUserHeatmapData(user *user_model.User, team *organization.Team, doer *user_model.User) ([]*UserHeatmapData, error) { hdata := make([]*UserHeatmapData, 0) if !activityReadable(user, doer) { |