mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-16 11:00:02 +02:00
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"
|
||||
)
|
||||
|
||||
// ActionList defines a list of actions
|
||||
|
@ -22,7 +23,7 @@ func (actions ActionList) getUserIDs() []int64 {
|
|||
userIDs[action.ActUserID] = struct{}{}
|
||||
}
|
||||
}
|
||||
return keysInt64(userIDs)
|
||||
return container.KeysInt64(userIDs)
|
||||
}
|
||||
|
||||
func (actions ActionList) loadUsers(e db.Engine) (map[int64]*user_model.User, error) {
|
||||
|
@ -52,7 +53,7 @@ func (actions ActionList) getRepoIDs() []int64 {
|
|||
repoIDs[action.RepoID] = struct{}{}
|
||||
}
|
||||
}
|
||||
return keysInt64(repoIDs)
|
||||
return container.KeysInt64(repoIDs)
|
||||
}
|
||||
|
||||
func (actions ActionList) loadRepositories(e db.Engine) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue