Skip to content

Commit

Permalink
style: Remove unnecessary switch-case.
Browse files Browse the repository at this point in the history
  • Loading branch information
vxern committed Sep 20, 2024
1 parent 7e17e14 commit 70f2b68
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions source/library/services/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,14 @@ class EntryService extends LocalService {
}

for (const rule of verificationConfiguration.activation) {
switch (rule.type) {
case "account-age": {
const createdAt = Discord.snowflakeToTimestamp(user.id);
const age = Date.now() - createdAt;
const createdAt = Discord.snowflakeToTimestamp(user.id);
const age = Date.now() - createdAt;

if (age < timeStructToMilliseconds(rule.value)) {
return true;
}

break;
}
if (age >= timeStructToMilliseconds(rule.value)) {
continue;
}

return true;
}

return false;
Expand Down

0 comments on commit 70f2b68

Please sign in to comment.