mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 15:05:35 +00:00
11 lines
247 B
TypeScript
11 lines
247 B
TypeScript
import { Session } from "next-auth";
|
|
import prisma from "utils/prisma";
|
|
|
|
export default async function getUserOrThrow(session: Session) {
|
|
return await prisma.user.findFirstOrThrow({
|
|
where: {
|
|
email: session?.user?.email,
|
|
},
|
|
});
|
|
}
|