Bobby Wibowo 6 years ago
parent
commit
38d77fdfbb
2 changed files with 2 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 1 1
      controllers/uploadController.js

+ 1 - 0
.gitignore

@@ -11,3 +11,4 @@ pages/custom/**
 migrate.js
 migrate.js
 yarn.lock
 yarn.lock
 package-lock.json
 package-lock.json
+.vscode/

+ 1 - 1
controllers/uploadController.js

@@ -98,7 +98,7 @@ uploadsController.actuallyUpload = async (req, res, userid, album) => {
 						hash: fileHash,
 						hash: fileHash,
 						ip: req.ip,
 						ip: req.ip,
 						albumid: album,
 						albumid: album,
-						userid: userid.id,
+						userid: userid !== undefined ? userid.id : null,
 						timestamp: Math.floor(Date.now() / 1000)
 						timestamp: Math.floor(Date.now() / 1000)
 					});
 					});
 				} else {
 				} else {