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
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;