diff options
| author | Pitu <[email protected]> | 2019-09-30 07:06:22 +0000 |
|---|---|---|
| committer | Pitu <[email protected]> | 2019-09-30 07:06:22 +0000 |
| commit | 8e4f1b7838e3c43320f2e25e691c1808ae3c4089 (patch) | |
| tree | 8549876e179dd9e636eb6a72cb7f8f630f6d315e /src/api/routes | |
| parent | Add parallel chunks and raise timeout (diff) | |
| download | host.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.js | 8 |
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 |