Skip to content

Commit 547f8a4

Browse files
committed
better security
1 parent f91ead3 commit 547f8a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/web/app/api/v1/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export async function getEmailAccountId({
2727

2828
if (!accountId) return undefined;
2929

30-
const emailAccount = await prisma.emailAccount.findFirst({
31-
where: { accountId },
30+
const emailAccount = await prisma.emailAccount.findUnique({
31+
where: { accountId, userId },
3232
select: { email: true },
3333
});
3434

0 commit comments

Comments
 (0)