api4/user: Deduplicate userids for getUsersByIds endpoint (#24344)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2023-08-24 15:14:01 +03:00
коммит произвёл GitHub
родитель 4145fd2f4e
Коммит 639d73b3e7
3 изменённых файлов: 18 добавлений и 3 удалений

Просмотреть файл

@@ -957,6 +957,10 @@ func getUsersByIds(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
// we remove the duplicate IDs as it can bring a significant load to the
// database.
userIDs = model.RemoveDuplicateStrings(userIDs)
sinceString := r.URL.Query().Get("since")
options := &store.UserGetByIdsOpts{