From d5fcb2ee26235464737e7be67bb316d4c54bee5e Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Wed, 24 Jan 2018 05:29:52 +0700 Subject: [PATCH] Updated uploadController.js Stricter comparison. --- controllers/uploadController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/uploadController.js b/controllers/uploadController.js index 94eb9a8..ee8cc19 100644 --- a/controllers/uploadController.js +++ b/controllers/uploadController.js @@ -98,7 +98,7 @@ uploadsController.actuallyUpload = async (req, res, userid, album) => { hash: fileHash, ip: req.ip, albumid: album, - userid: userid ? userid.id : null, + userid: userid !== undefined ? userid.id : null, timestamp: Math.floor(Date.now() / 1000) }) } else {