fix(api): Fix #6419

Close #6434
This commit is contained in:
syuilo 2020-06-03 13:19:07 +09:00
parent fd2573c068
commit 6b2c289029

View file

@ -21,7 +21,11 @@ export default async (token: string): Promise<[User | null | undefined, AccessTo
return [user, null];
} else {
const accessToken = await AccessTokens.findOne({
hash: token.toLowerCase()
where: [{
hash: token.toLowerCase() // app
}, {
token: token // miauth
}],
});
if (accessToken == null) {