diff options
Diffstat (limited to 'src/api/routes/albums/link/linkPOST.js')
| -rw-r--r-- | src/api/routes/albums/link/linkPOST.js | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/api/routes/albums/link/linkPOST.js b/src/api/routes/albums/link/linkPOST.js index 42eac58..7bc8051 100644 --- a/src/api/routes/albums/link/linkPOST.js +++ b/src/api/routes/albums/link/linkPOST.js @@ -20,16 +20,6 @@ class linkPOST extends Route { .first(); if (!exists) return res.status(400).json({ message: 'Album doesn\t exist' }); - /* - Count the amount of links created for that album already and error out if max was reached - */ - const count = await db - .table('links') - .where('albumId', albumId) - .count({ count: 'id' }) - .first(); - if (count >= parseInt(process.env.MAX_LINKS_PER_ALBUM, 10)) return res.status(400).json({ message: 'Maximum links per album reached' }); - let { identifier } = req.body; if (identifier) { if (!user.isAdmin) return res.status(401).json({ message: 'Only administrators can create custom links' }); |