aboutsummaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorKana <[email protected]>2018-03-05 01:40:45 -0300
committerGitHub <[email protected]>2018-03-05 01:40:45 -0300
commit496575dea059ebd7e53074d759dbf58c34202894 (patch)
treedac8b7f7b4f2afd40a63706fe378ab12253d080d /controllers
parentupdate deps and add dockerfile (diff)
downloadhost.fuwn.me-496575dea059ebd7e53074d759dbf58c34202894.tar.xz
host.fuwn.me-496575dea059ebd7e53074d759dbf58c34202894.zip
Whoops
Diffstat (limited to 'controllers')
-rw-r--r--controllers/uploadController.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/controllers/uploadController.js b/controllers/uploadController.js
index 386ee02..4e4b2e0 100644
--- a/controllers/uploadController.js
+++ b/controllers/uploadController.js
@@ -39,7 +39,7 @@ uploadsController.upload = async (req, res, next) => {
const token = req.headers.token || '';
const user = await db.table('users').where('token', token).first();
- if (user.enabled === false || user.enabled === 0) return res.json({
+ if (user && (user.enabled === false || user.enabled === 0)) return res.json({
success: false,
description: 'This account has been disabled'
});