diff options
| author | Pitu <[email protected]> | 2018-09-17 04:38:25 -0300 |
|---|---|---|
| committer | Pitu <[email protected]> | 2018-09-17 04:38:25 -0300 |
| commit | c2c6e99878853fafdbd5e708c3163921f8529ae1 (patch) | |
| tree | 8313268655c19bc74497172ee1d0642a52e93984 /src/api/utils/Util.js | |
| parent | This route should handle more stuff, so it does now (diff) | |
| download | host.fuwn.me-c2c6e99878853fafdbd5e708c3163921f8529ae1.tar.xz host.fuwn.me-c2c6e99878853fafdbd5e708c3163921f8529ae1.zip | |
Public albums wooo!
Diffstat (limited to 'src/api/utils/Util.js')
| -rw-r--r-- | src/api/utils/Util.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/utils/Util.js b/src/api/utils/Util.js index d8ae735..e0ad031 100644 --- a/src/api/utils/Util.js +++ b/src/api/utils/Util.js @@ -105,7 +105,7 @@ class Util { static getUniqueAlbumIdentifier() { const retry = async (i = 0) => { const identifier = randomstring.generate({ - length: config.uploads.generatedAlbumLinkLength, + length: config.albums.generatedAlbumLinkLength, capitalization: 'lowercase' }); const exists = await db.table('links').where({ identifier }).first(); @@ -113,7 +113,7 @@ class Util { /* It's funny but if you do i++ the asignment never gets done resulting in an infinite loop */ - if (i < config.uploads.retryAlbumLinkTimes) return retry(i + 1); + if (i < config.albums.retryAlbumLinkTimes) return retry(i + 1); log.error('Couldnt allocate identifier for album'); return null; }; |