mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Small refactor to reduce unnecessary database queries and remove duplicated functions (#33779)
This commit is contained in:
@@ -11,6 +11,10 @@ import (
|
||||
|
||||
func GetUsersMapByIDs(ctx context.Context, userIDs []int64) (map[int64]*User, error) {
|
||||
userMaps := make(map[int64]*User, len(userIDs))
|
||||
if len(userIDs) == 0 {
|
||||
return userMaps, nil
|
||||
}
|
||||
|
||||
left := len(userIDs)
|
||||
for left > 0 {
|
||||
limit := db.DefaultMaxInSize
|
||||
|
Reference in New Issue
Block a user