diff options
Diffstat (limited to 'src/api/routes')
| -rw-r--r-- | src/api/routes/albums/albumGET.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/routes/albums/albumGET.js b/src/api/routes/albums/albumGET.js index b63811c..f5e339f 100644 --- a/src/api/routes/albums/albumGET.js +++ b/src/api/routes/albums/albumGET.js @@ -16,13 +16,13 @@ class albumGET extends Route { Make sure it exists and it's enabled */ const link = await db.table('links').where({ identifier, enabled: true }).first(); - if (!link) return res.status(400).json({ message: 'The identifier supplied could not be found' }); + if (!link) return res.status(404).json({ message: 'The identifier supplied could not be found' }); /* Same with the album, just to make sure is not a deleted album and a leftover link */ const album = await db.table('albums').where('id', link.albumId).first(); - if (!album) return res.status(400).json({ message: 'Album not found' }); + if (!album) return res.status(404).json({ message: 'Album not found' }); /* Grab the files in a very unoptimized way. (This should be a join between both tables) |