mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Fix ban users var not used
This commit is contained in:
parent
d5c544f1ee
commit
5c1b502a15
1 changed files with 6 additions and 3 deletions
|
@ -132,9 +132,12 @@ async function banIP(hashedIP: HashedIP, enabled: boolean, unHideOldSubmissions:
|
|||
//find all previous submissions and hide them
|
||||
if (unHideOldSubmissions) {
|
||||
const users = await unHideSubmissionsByIP(categories, hashedIP, type);
|
||||
await Promise.all([...users].map((user) => {
|
||||
return banUser(user, enabled, unHideOldSubmissions, type, categories);
|
||||
}))
|
||||
|
||||
if (banUsers) {
|
||||
await Promise.all([...users].map((user) => {
|
||||
return banUser(user, enabled, unHideOldSubmissions, type, categories);
|
||||
}));
|
||||
}
|
||||
} else if (row.userCount > 0) {
|
||||
// Nothing to do, and already added
|
||||
return 409;
|
||||
|
|
Loading…
Reference in a new issue