Upgraded to Next Auth v5

This commit is contained in:
Tom
2024-01-02 07:26:20 +00:00
parent a3352af981
commit 4505654a05
24 changed files with 283 additions and 227 deletions

10
data/user.ts Normal file
View File

@ -0,0 +1,10 @@
import { db } from "@/lib/db";
export const getUserById = async (id: string) => {
try {
const user = await db.user.findUnique({ where: { id }})
return user;
} catch {
return null;
}
}