aboutsummaryrefslogtreecommitdiff
path: root/src/api/utils
diff options
context:
space:
mode:
authorPitu <[email protected]>2020-07-18 03:05:12 +0900
committerPitu <[email protected]>2020-07-18 03:05:12 +0900
commit407fb8bcc31cd69394a2444db53b710cc2dc4d55 (patch)
treed9e696fcae925629d85c23927586b15dda92a800 /src/api/utils
parentFix authorization (diff)
downloadhost.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.js2
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;