aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes
diff options
context:
space:
mode:
authorPitu <[email protected]>2019-09-30 07:06:22 +0000
committerPitu <[email protected]>2019-09-30 07:06:22 +0000
commit8e4f1b7838e3c43320f2e25e691c1808ae3c4089 (patch)
tree8549876e179dd9e636eb6a72cb7f8f630f6d315e /src/api/routes
parentAdd parallel chunks and raise timeout (diff)
downloadhost.fuwn.me-8e4f1b7838e3c43320f2e25e691c1808ae3c4089.tar.xz
host.fuwn.me-8e4f1b7838e3c43320f2e25e691c1808ae3c4089.zip
feature: album links
Diffstat (limited to 'src/api/routes')
-rw-r--r--src/api/routes/albums/albumZipGET.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/api/routes/albums/albumZipGET.js b/src/api/routes/albums/albumZipGET.js
index b2c9fa7..d1d3e16 100644
--- a/src/api/routes/albums/albumZipGET.js
+++ b/src/api/routes/albums/albumZipGET.js
@@ -17,9 +17,13 @@ class albumGET extends Route {
Make sure it exists and it's enabled
*/
const link = await db.table('links')
- .where({ identifier, enabled: true })
+ .where({
+ identifier,
+ enabled: true,
+ enableDownload: true
+ })
.first();
- if (!link) return res.status(400).json({ message: 'The identifier supplied could not be found' });
+ if (!link) return res.status(400).json({ message: 'The supplied identifier could not be found' });
/*
Same with the album, just to make sure is not a deleted album and a leftover link