mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-22 04:00:19 +02:00
Update requestPasswordReset.ts
This commit is contained in:
@@ -49,7 +49,12 @@ export async function requestPasswordReset(
|
|||||||
const existingUser = await db
|
const existingUser = await db
|
||||||
.select()
|
.select()
|
||||||
.from(users)
|
.from(users)
|
||||||
.where(eq(users.email, email));
|
.where(
|
||||||
|
and(
|
||||||
|
eq(users.email, email),
|
||||||
|
eq(users.type, UserType.Internal)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if (!existingUser || !existingUser.length) {
|
if (!existingUser || !existingUser.length) {
|
||||||
await randomDelay(2000);
|
await randomDelay(2000);
|
||||||
|
|||||||
Reference in New Issue
Block a user