mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
changed cursor to Cursor scalar type, changed SORT_ORDER
This commit is contained in:
@@ -36,7 +36,7 @@ const getUsersByQuery = ({user}, {ids, limit, cursor, statuses = null, sort}) =>
|
||||
}
|
||||
|
||||
if (cursor) {
|
||||
if (sort === 'REVERSE_CHRONOLOGICAL') {
|
||||
if (sort === 'DESC') {
|
||||
users = users.where({
|
||||
created_at: {
|
||||
$lt: cursor
|
||||
@@ -52,7 +52,7 @@ const getUsersByQuery = ({user}, {ids, limit, cursor, statuses = null, sort}) =>
|
||||
}
|
||||
|
||||
return users
|
||||
.sort({created_at: sort === 'REVERSE_CHRONOLOGICAL' ? -1 : 1})
|
||||
.sort({created_at: sort === 'DESC' ? -1 : 1})
|
||||
.limit(limit);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user