diff options
| author | Zephyrrus <[email protected]> | 2020-12-24 10:40:50 +0200 |
|---|---|---|
| committer | Zephyrrus <[email protected]> | 2020-12-24 10:40:50 +0200 |
| commit | 90001c2df56d58e69fd199a518ae7f3e4ed327fc (patch) | |
| tree | ac601537b5f464a1b03b084e5139e460f42e3473 /src/api/routes/albums/albumZipGET.js | |
| parent | chore: update lock files (diff) | |
| download | host.fuwn.me-90001c2df56d58e69fd199a518ae7f3e4ed327fc.tar.xz host.fuwn.me-90001c2df56d58e69fd199a518ae7f3e4ed327fc.zip | |
chore: remove trailing commas
Diffstat (limited to 'src/api/routes/albums/albumZipGET.js')
| -rw-r--r-- | src/api/routes/albums/albumZipGET.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/routes/albums/albumZipGET.js b/src/api/routes/albums/albumZipGET.js index bd74ef3..cf1f6f8 100644 --- a/src/api/routes/albums/albumZipGET.js +++ b/src/api/routes/albums/albumZipGET.js @@ -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' }); @@ -38,7 +38,7 @@ class albumGET extends Route { If the date when the album was zipped is greater than the album's last edit, we just send the zip to the user */ if (album.zippedAt > album.editedAt) { - const filePath = path.join(__dirname, '..', '..', '..', '..', process.env.UPLOAD_FOLDER, 'zips', `${album.userId}-${album.id}.zip`); + const filePath = path.join(__dirname, '../../../../', process.env.UPLOAD_FOLDER, 'zips', `${album.userId}-${album.id}.zip`); const exists = await jetpack.existsAsync(filePath); /* Make sure the file exists just in case, and if not, continue to it's generation. @@ -76,7 +76,7 @@ class albumGET extends Route { .where('id', link.albumId) .update('zippedAt', db.fn.now()); - const filePath = path.join(__dirname, '..', '..', '..', '..', process.env.UPLOAD_FOLDER, 'zips', `${album.userId}-${album.id}.zip`); + const filePath = path.join(__dirname, '../../../../', process.env.UPLOAD_FOLDER, 'zips', `${album.userId}-${album.id}.zip`); const fileName = `lolisafe-${identifier}.zip`; return res.download(filePath, fileName); } catch (error) { |