mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-12 06:27:10 +03:00
Fix ban users var not used
This commit is contained in:
@@ -132,9 +132,12 @@ async function banIP(hashedIP: HashedIP, enabled: boolean, unHideOldSubmissions:
|
|||||||
//find all previous submissions and hide them
|
//find all previous submissions and hide them
|
||||||
if (unHideOldSubmissions) {
|
if (unHideOldSubmissions) {
|
||||||
const users = await unHideSubmissionsByIP(categories, hashedIP, type);
|
const users = await unHideSubmissionsByIP(categories, hashedIP, type);
|
||||||
|
|
||||||
|
if (banUsers) {
|
||||||
await Promise.all([...users].map((user) => {
|
await Promise.all([...users].map((user) => {
|
||||||
return banUser(user, enabled, unHideOldSubmissions, type, categories);
|
return banUser(user, enabled, unHideOldSubmissions, type, categories);
|
||||||
}))
|
}));
|
||||||
|
}
|
||||||
} else if (row.userCount > 0) {
|
} else if (row.userCount > 0) {
|
||||||
// Nothing to do, and already added
|
// Nothing to do, and already added
|
||||||
return 409;
|
return 409;
|
||||||
|
|||||||
Reference in New Issue
Block a user