Fix ban users var not used

This commit is contained in:
Ajay
2023-01-28 14:04:14 -05:00
parent d5c544f1ee
commit 5c1b502a15

View File

@@ -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);
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) { } else if (row.userCount > 0) {
// Nothing to do, and already added // Nothing to do, and already added
return 409; return 409;