Updated uploadController.js

Removed unnecessary check.
This commit is contained in:
Bobby Wibowo 2020-05-29 02:56:11 +07:00
parent 62a977542e
commit 867d005b34
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -618,7 +618,7 @@ self.storeFilesToDb = async (req, res, user, infoMap) => {
await Promise.all(infoMap.map(async info => {
// Check if the file exists by checking its hash and size
const dbFile = info.data.hash && await db.table('files')
const dbFile = await db.table('files')
.where(function () {
if (user === undefined)
this.whereNull('userid')