fix: fetch session profile from DB

This commit is contained in:
Vasily Zubarev
2025-04-22 14:43:45 +02:00
parent cfcbfd5445
commit 9809e05453
4 changed files with 31 additions and 13 deletions

View File

@@ -21,6 +21,12 @@ export const createSelfHostedUser = cache(async () => {
})
})
export const getUserById = cache(async (id: string) => {
return await prisma.user.findUnique({
where: { id },
})
})
export const getUserByEmail = cache(async (email: string) => {
return await prisma.user.findUnique({
where: { email },