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 {