diff options
| author | Kana <[email protected]> | 2018-03-05 01:40:45 -0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-03-05 01:40:45 -0300 |
| commit | 496575dea059ebd7e53074d759dbf58c34202894 (patch) | |
| tree | dac8b7f7b4f2afd40a63706fe378ab12253d080d /controllers | |
| parent | update deps and add dockerfile (diff) | |
| download | host.fuwn.me-496575dea059ebd7e53074d759dbf58c34202894.tar.xz host.fuwn.me-496575dea059ebd7e53074d759dbf58c34202894.zip | |
Whoops
Diffstat (limited to 'controllers')
| -rw-r--r-- | controllers/uploadController.js | 2 |
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' }); |