From 6a26d4d91036dae824c5868de13d19a4d3b85c85 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 8 Feb 2017 22:49:01 +0900 Subject: [PATCH] [Server] toLowerCase :v: --- src/api/authenticate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/authenticate.ts b/src/api/authenticate.ts index 8d3ed9c32..d4cc3fc41 100644 --- a/src/api/authenticate.ts +++ b/src/api/authenticate.ts @@ -22,7 +22,7 @@ export interface IAuthContext { } export default (req: express.Request) => new Promise(async (resolve, reject) => { - const token = req.body['i']; + const token = req.body['i'] as string; if (token == null) { return resolve({ app: null, user: null, isSecure: false }); @@ -43,7 +43,7 @@ export default (req: express.Request) => new Promise(async (resolv }); } else { const accessToken = await AccessToken.findOne({ - hash: token + hash: token.toLowerCase() }); if (accessToken === null) {