Update authenticate.ts

This commit is contained in:
syuilo 2019-04-16 01:20:28 +09:00
parent c44543bd3e
commit fdeaaf845c

View file

@ -31,7 +31,9 @@ export default async (token: string): Promise<[User | null | undefined, App | nu
.findOne(accessToken.appId); .findOne(accessToken.appId);
const user = await Users const user = await Users
.findOne(accessToken.userId); .findOne({
id: accessToken.userId // findOne(accessToken.userId) のように書かないのは後方互換性のため
});
return [user, app]; return [user, app];
} }