diff options
| author | Pitu <[email protected]> | 2020-07-18 03:05:12 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2020-07-18 03:05:12 +0900 |
| commit | 407fb8bcc31cd69394a2444db53b710cc2dc4d55 (patch) | |
| tree | d9e696fcae925629d85c23927586b15dda92a800 /src/api/utils | |
| parent | Fix authorization (diff) | |
| download | host.fuwn.me-407fb8bcc31cd69394a2444db53b710cc2dc4d55.tar.xz host.fuwn.me-407fb8bcc31cd69394a2444db53b710cc2dc4d55.zip | |
Fix authorization
Diffstat (limited to 'src/api/utils')
| -rw-r--r-- | src/api/utils/Util.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/utils/Util.js b/src/api/utils/Util.js index 7f6dd22..91ab663 100644 --- a/src/api/utils/Util.js +++ b/src/api/utils/Util.js @@ -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; |