From 1f88c4d40c3e6dba6da173496e444e46323d84c5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 Feb 2017 13:08:33 +0900 Subject: [Server] Some performance improvements --- src/api/endpoints/aggregation/users/following.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/api/endpoints/aggregation/users/following.js') diff --git a/src/api/endpoints/aggregation/users/following.js b/src/api/endpoints/aggregation/users/following.js index 785e5a15c3..9647639fbb 100644 --- a/src/api/endpoints/aggregation/users/following.js +++ b/src/api/endpoints/aggregation/users/following.js @@ -25,6 +25,10 @@ module.exports = (params) => // Lookup user const user = await User.findOne({ _id: new mongo.ObjectID(userId) + }, { + fields: { + _id: true + } }); if (user === null) { -- cgit v1.3.1-freya