pollo/app/services/helpers.server.ts
2023-11-29 12:44:15 -07:00

22 lines
459 B
TypeScript

export const isShit = (email: string) => {
if (!process.env.SHIT_LIST) {
return false;
}
const shitListString = process.env.SHIT_LIST as string;
const shitList = shitListString.split(",");
let result = false;
shitList.forEach((shitItem) => {
if (email.includes(shitItem)) {
console.log(
`🔴 BLOCKED USEREMAIL: ${email}\n🔴 FAILED CONDITION: ${shitItem}`
);
result = true;
}
});
return result;
};