From fdeaaf845c4055381275bc54cddca66aee7e3af8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 16 Apr 2019 01:20:28 +0900 Subject: [PATCH] Update authenticate.ts --- src/server/api/authenticate.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/api/authenticate.ts b/src/server/api/authenticate.ts index ecf4a82c4..519ed7738 100644 --- a/src/server/api/authenticate.ts +++ b/src/server/api/authenticate.ts @@ -31,7 +31,9 @@ export default async (token: string): Promise<[User | null | undefined, App | nu .findOne(accessToken.appId); const user = await Users - .findOne(accessToken.userId); + .findOne({ + id: accessToken.userId // findOne(accessToken.userId) のように書かないのは後方互換性のため + }); return [user, app]; }