forked from NYANDEV/forgejo
Move reaction to models/issues/ (#19264)
* Move reaction to models/issues/ * Fix test * move the function * improve code * Update models/issues/reaction.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
43332a483f
commit
d4f84f1c93
18 changed files with 280 additions and 274 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
"code.gitea.io/gitea/models/db"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/container"
|
||||
|
||||
"xorm.io/builder"
|
||||
)
|
||||
|
@ -32,7 +33,7 @@ func (issues IssueList) getRepoIDs() []int64 {
|
|||
repoIDs[issue.RepoID] = struct{}{}
|
||||
}
|
||||
}
|
||||
return keysInt64(repoIDs)
|
||||
return container.KeysInt64(repoIDs)
|
||||
}
|
||||
|
||||
func (issues IssueList) loadRepositories(e db.Engine) ([]*repo_model.Repository, error) {
|
||||
|
@ -83,7 +84,7 @@ func (issues IssueList) getPosterIDs() []int64 {
|
|||
posterIDs[issue.PosterID] = struct{}{}
|
||||
}
|
||||
}
|
||||
return keysInt64(posterIDs)
|
||||
return container.KeysInt64(posterIDs)
|
||||
}
|
||||
|
||||
func (issues IssueList) loadPosters(e db.Engine) error {
|
||||
|
@ -189,7 +190,7 @@ func (issues IssueList) getMilestoneIDs() []int64 {
|
|||
ids[issue.MilestoneID] = struct{}{}
|
||||
}
|
||||
}
|
||||
return keysInt64(ids)
|
||||
return container.KeysInt64(ids)
|
||||
}
|
||||
|
||||
func (issues IssueList) loadMilestones(e db.Engine) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue