Skip to content
Snippets Groups Projects
Commit d96762cb authored by syuilo's avatar syuilo
Browse files

[Server] Fix query performance

parent a9a763f8
No related branches found
No related tags found
No related merge requests found
......@@ -50,13 +50,13 @@ module.exports = (params, user) =>
// Construct query
const sort = {
created_at: -1
_id: -1
};
const query = {
user_id: user._id
};
if (since !== null) {
sort.created_at = 1;
sort._id = 1;
query._id = {
$gt: new mongo.ObjectID(since)
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment