aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/albums/albumZipGET.js
diff options
context:
space:
mode:
authorZephyrrus <[email protected]>2020-07-08 04:00:12 +0300
committerZephyrrus <[email protected]>2020-07-08 04:00:12 +0300
commitad852de51a0d2dd5d29c08838d5a430c58849e74 (patch)
treea4ab9a720f66271c9eba10916061a9b06c43656e /src/api/routes/albums/albumZipGET.js
parentrefactor: refactor grid to use vuex for every action (diff)
downloadhost.fuwn.me-ad852de51a0d2dd5d29c08838d5a430c58849e74.tar.xz
host.fuwn.me-ad852de51a0d2dd5d29c08838d5a430c58849e74.zip
chore: linter the entire project using the new rules
Diffstat (limited to 'src/api/routes/albums/albumZipGET.js')
-rw-r--r--src/api/routes/albums/albumZipGET.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/api/routes/albums/albumZipGET.js b/src/api/routes/albums/albumZipGET.js
index a6ef6fd..bd74ef3 100644
--- a/src/api/routes/albums/albumZipGET.js
+++ b/src/api/routes/albums/albumZipGET.js
@@ -1,8 +1,8 @@
+const path = require('path');
+const jetpack = require('fs-jetpack');
const Route = require('../../structures/Route');
const Util = require('../../utils/Util');
const log = require('../../utils/Log');
-const path = require('path');
-const jetpack = require('fs-jetpack');
class albumGET extends Route {
constructor() {
@@ -21,7 +21,7 @@ class albumGET extends Route {
.where({
identifier,
enabled: true,
- enableDownload: true
+ enableDownload: true,
})
.first();
if (!link) return res.status(400).json({ message: 'The supplied identifier could not be found' });
@@ -64,11 +64,11 @@ class albumGET extends Route {
/*
Get the actual files
*/
- const fileIds = fileList.map(el => el.fileId);
+ const fileIds = fileList.map((el) => el.fileId);
const files = await db.table('files')
.whereIn('id', fileIds)
.select('name');
- const filesToZip = files.map(el => el.name);
+ const filesToZip = files.map((el) => el.name);
try {
Util.createZip(filesToZip, album);