From 130876c43ebf3c328395b1eabd1ed4d57a66be8c Mon Sep 17 00:00:00 2001 From: tycrek Date: Tue, 6 Jul 2021 14:50:47 -0600 Subject: [PATCH] DS --- routers/resource.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routers/resource.js b/routers/resource.js index f1b53b4..29c957e 100644 --- a/routers/resource.js +++ b/routers/resource.js @@ -18,7 +18,7 @@ router.use((req, res, next) => { // If the ID is invalid, return 404. Otherwise, continue normally data.has(req.ass.resourceId) - .then((has) => has ? next() : res.sendStatus(CODE_NOT_FOUND)) + .then((has) => has ? next() : res.sendStatus(CODE_NOT_FOUND)) // skipcq: JS-0229 .catch(next); }); @@ -98,7 +98,7 @@ router.get('/oembed', (req, res, next) => // Delete file router.get('/delete/:deleteId', (req, res, next) => { - let oldName, oldType; + let oldName, oldType; // skipcq: JS-0119 data.get(req.ass.resourceId) .then((fileData) => { // Extract info for logs @@ -115,7 +115,7 @@ router.get('/delete/:deleteId', (req, res, next) => { return Promise.all([s3enabled ? deleteS3(fileData) : fs.rmSync(path(fileData.path)), fs.rmSync(path(diskFilePath, 'thumbnails/', fileData.thumbnail))]); }) .then(() => data.del(req.ass.resourceId)) - .then(() => (log(`Deleted: ${oldName} (${oldType})`), res.type('text').send('File has been deleted!'))) + .then(() => (log(`Deleted: ${oldName} (${oldType})`), res.type('text').send('File has been deleted!'))) // skipcq: JS-0090 .catch(next); });