diff options
| author | Kana <[email protected]> | 2021-06-19 02:03:57 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-06-19 02:03:57 +0900 |
| commit | 065c5221a0250838f1d1f9bb7a7922ff4f55e038 (patch) | |
| tree | 8a69a81f00e6bff2752f4f7c59dcbbf21f893b20 /src/api/routes/albums/link | |
| parent | chore: docs update (diff) | |
| parent | fix: potentially fix the blocked extensions array splitting (diff) | |
| download | host.fuwn.me-065c5221a0250838f1d1f9bb7a7922ff4f55e038.tar.xz host.fuwn.me-065c5221a0250838f1d1f9bb7a7922ff4f55e038.zip | |
Merge pull request #278 from Zephyrrus/Zephyrrus-feature/database_based_settings
Zephyrrus feature/database based settings
Diffstat (limited to 'src/api/routes/albums/link')
| -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' }); |