коммит произвёл
GitHub
родитель
b45ff0be5d
Коммит
717a4d04a9
@@ -932,7 +932,7 @@ func (us SqlUserStore) GetProfilesByUsernames(usernames []string, viewRestrictio
|
||||
query = applyViewRestrictionsFilter(query, viewRestrictions, true)
|
||||
|
||||
query = query.
|
||||
Where(map[string]interface{}{
|
||||
Where(map[string]any{
|
||||
"Username": usernames,
|
||||
}).
|
||||
OrderBy("u.Username ASC")
|
||||
@@ -1021,13 +1021,13 @@ func (us SqlUserStore) GetProfileByIds(ctx context.Context, userIds []string, op
|
||||
|
||||
users := []*model.User{}
|
||||
query := us.usersQuery.
|
||||
Where(map[string]interface{}{
|
||||
Where(map[string]any{
|
||||
"u.Id": userIds,
|
||||
}).
|
||||
OrderBy("u.Username ASC")
|
||||
|
||||
if options.Since > 0 {
|
||||
query = query.Where(sq.Gt(map[string]interface{}{
|
||||
query = query.Where(sq.Gt(map[string]any{
|
||||
"u.UpdateAt": options.Since,
|
||||
}))
|
||||
}
|
||||
@@ -1499,7 +1499,7 @@ func (us SqlUserStore) SearchNotInGroup(groupID string, term string, options *mo
|
||||
func generateSearchQuery(query sq.SelectBuilder, terms []string, fields []string, isPostgreSQL bool) sq.SelectBuilder {
|
||||
for _, term := range terms {
|
||||
searchFields := []string{}
|
||||
termArgs := []interface{}{}
|
||||
termArgs := []any{}
|
||||
for _, field := range fields {
|
||||
if isPostgreSQL {
|
||||
searchFields = append(searchFields, fmt.Sprintf("lower(%s) LIKE lower(?) escape '*' ", field))
|
||||
@@ -1859,11 +1859,11 @@ func applyViewRestrictionsFilter(query sq.SelectBuilder, restrictions *model.Vie
|
||||
return query.Where("1 = 0")
|
||||
}
|
||||
|
||||
teams := make([]interface{}, len(restrictions.Teams))
|
||||
teams := make([]any, len(restrictions.Teams))
|
||||
for i, v := range restrictions.Teams {
|
||||
teams[i] = v
|
||||
}
|
||||
channels := make([]interface{}, len(restrictions.Channels))
|
||||
channels := make([]any, len(restrictions.Channels))
|
||||
for i, v := range restrictions.Channels {
|
||||
channels[i] = v
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user