Skip to content

Commit 12251d3

Browse files
committed
🐛fix auto delete blocklist with forever duration
1 parent 9fbf579 commit 12251d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

controlpanel/api/services/configmanager.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ module.exports = {
6565
if (!protectedApp) return { type: 'error', code: 404, message: 'Invalid namespace or application supplied' };
6666
const blocklist = await Blocklist.findAll({ where: { pa_id: protectedApp.id } });
6767
for (const blockElement of blocklist) {
68+
if (blockElement.content.Duration == 'forever') continue;
6869
const duration = parseInt(blockElement.content.Duration.substring(0, blockElement.content.Duration.length - 1));
6970
const ext = blockElement.content.Duration.slice(-1);
7071
const unbanDate = new Date(blockElement.content.Time * 1000);

0 commit comments

Comments
 (0)