const encryptedEmails = emails.map(email => encryptColumn(email));
const fetchedUsers = await db
.select({
id: neptun_user.id,
})
.from(neptun_user)
/* @ts-ignore */
.where(inArray(neptun_user.primary_email, encryptedEmails))
.catch((err) => {
if (LOG_BACKEND) console.error('Failed to fetch user from database', err);
return null;
})
const encryptedEmails = emails.map(email => encryptColumn(email));
const fetchedUsers = await db
.select({
id: neptun_user.id,
})
.from(neptun_user)
/* @ts-ignore */
.where(inArray(neptun_user.primary_email, encryptedEmails))
.catch((err) => {
if (LOG_BACKEND) console.error('Failed to fetch user from database', err);
return null;
})