MM-24692: Add a since parameter to getGroups api (#14444)
* add a since parameter to getGroups api * update for lint error * when using since, return deleted groups as well. * update flaky test, groups have same create time Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1031e27fd8
Коммит
80c846412d
@@ -1144,9 +1144,16 @@ func (s *SqlGroupStore) GetGroups(page, perPage int, opts model.GroupSearchOpts)
|
||||
|
||||
groupsQuery = groupsQuery.
|
||||
From("UserGroups g").
|
||||
Where("g.DeleteAt = 0").
|
||||
OrderBy("g.DisplayName")
|
||||
|
||||
if opts.Since > 0 {
|
||||
groupsQuery = groupsQuery.Where(sq.Gt{
|
||||
"g.UpdateAt": opts.Since,
|
||||
})
|
||||
} else {
|
||||
groupsQuery = groupsQuery.Where("g.DeleteAt = 0")
|
||||
}
|
||||
|
||||
if perPage != 0 {
|
||||
groupsQuery = groupsQuery.
|
||||
Limit(uint64(perPage)).
|
||||
|
||||
Ссылка в новой задаче
Block a user