Fix authorization

This commit is contained in:
Pitu 2020-07-18 03:05:12 +09:00
parent 5f58431409
commit 407fb8bcc3
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ class Util {
if (req.headers.token) {
const user = await db.table('users').where({ apiKey: req.headers.token }).first();
if (!user || !user.enabled) return false;
return true;
return user;
}
if (!req.headers.authorization) return false;