feat(api): sort members in sql
This commit is contained in:
parent
73c5c9fc67
commit
17cc57a31d
|
@ -63,7 +63,7 @@ func (db *DB) UserMember(ctx context.Context, userID xid.ID, memberRef string) (
|
|||
}
|
||||
|
||||
func (db *DB) UserMembers(ctx context.Context, userID xid.ID) (ms []Member, err error) {
|
||||
sql, args, err := sq.Select("*").From("members").Where("user_id = ?", userID).ToSql()
|
||||
sql, args, err := sq.Select("*").From("members").Where("user_id = ?", userID).OrderBy("name", "id").ToSql()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "building sql")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue