aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes
diff options
context:
space:
mode:
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