summaryrefslogtreecommitdiff
path: root/src/api/endpoints/aggregation
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/endpoints/aggregation')
-rw-r--r--src/api/endpoints/aggregation/users/followers.js4
-rw-r--r--src/api/endpoints/aggregation/users/following.js4
-rw-r--r--src/api/endpoints/aggregation/users/like.js4
-rw-r--r--src/api/endpoints/aggregation/users/post.js4
4 files changed, 16 insertions, 0 deletions
diff --git a/src/api/endpoints/aggregation/users/followers.js b/src/api/endpoints/aggregation/users/followers.js
index f49c2a2fcd..85cfe95dad 100644
--- a/src/api/endpoints/aggregation/users/followers.js
+++ b/src/api/endpoints/aggregation/users/followers.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) {
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) {
diff --git a/src/api/endpoints/aggregation/users/like.js b/src/api/endpoints/aggregation/users/like.js
index f5344f6ba3..c138c62464 100644
--- a/src/api/endpoints/aggregation/users/like.js
+++ b/src/api/endpoints/aggregation/users/like.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) {
diff --git a/src/api/endpoints/aggregation/users/post.js b/src/api/endpoints/aggregation/users/post.js
index f968ff4158..3d1ea7d190 100644
--- a/src/api/endpoints/aggregation/users/post.js
+++ b/src/api/endpoints/aggregation/users/post.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) {