From 43e6ddc1e4838d264143be75700b3aabf900f589 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 21 Jan 2017 07:45:06 +0900 Subject: [PATCH] Fix --- src/api/streaming.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/api/streaming.ts b/src/api/streaming.ts index 32daf872f..8348d7c38 100644 --- a/src/api/streaming.ts +++ b/src/api/streaming.ts @@ -59,7 +59,9 @@ function authenticate(connection: websocket.connection, token: string): Promise< .findOne({ token: token }, { - _id: true + fields: { + _id: true + } }); resolve(user); @@ -76,7 +78,9 @@ function authenticate(connection: websocket.connection, token: string): Promise< // SELECT _id const user = await User .findOne({ _id: accessToken.user_id }, { - _id: true + fields: { + _id: true + } }); resolve(user);