diff options
| author | Pitu <[email protected]> | 2017-10-04 00:59:05 -0300 |
|---|---|---|
| committer | Pitu <[email protected]> | 2017-10-04 00:59:05 -0300 |
| commit | e56ef979751ff0bf9013632ee779f72eb50efb00 (patch) | |
| tree | 0c631bb0ec1f20cea2fdb6aeb5f24905bc02a75e /controllers | |
| parent | Fixes serving the actual configured uploads folder (diff) | |
| download | host.fuwn.me-e56ef979751ff0bf9013632ee779f72eb50efb00.tar.xz host.fuwn.me-e56ef979751ff0bf9013632ee779f72eb50efb00.zip | |
Return 404 for deleted albums
Diffstat (limited to 'controllers')
| -rw-r--r-- | controllers/albumsController.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/controllers/albumsController.js b/controllers/albumsController.js index 7c9c7da..57597ca 100644 --- a/controllers/albumsController.js +++ b/controllers/albumsController.js @@ -106,7 +106,7 @@ albumsController.get = async (req, res, next) => { const identifier = req.params.identifier; if (identifier === undefined) return res.status(401).json({ success: false, description: 'No identifier provided' }); - const album = await db.table('albums').where('identifier', identifier).first(); + const album = await db.table('albums').where({ identifier, enabled: 1 }).first(); if (!album) return res.json({ success: false, description: 'Album not found' }); const title = album.name; |