From 38d77fdfbb68b332765eef03be0ce2fb78599b93 Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Wed, 24 Jan 2018 05:29:13 +0700 Subject: [PATCH] Fix --- .gitignore | 1 + controllers/uploadController.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 13b9656..5c95e05 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ pages/custom/** migrate.js yarn.lock package-lock.json +.vscode/ diff --git a/controllers/uploadController.js b/controllers/uploadController.js index 3fb9b55..9f10c8c 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.id, + userid: userid !== undefined ? userid.id : null, timestamp: Math.floor(Date.now() / 1000) }); } else {