Add sequelize index file

This commit is contained in:
Jorge Vargas 2024-09-03 19:11:19 -06:00
parent 6f00481c25
commit d20b00532d
12 changed files with 77 additions and 50 deletions

11
src/utils/resolvers.ts Normal file
View file

@ -0,0 +1,11 @@
import User from "@/sequelize/models/user";
import type { Session } from "@auth/core";
export async function getUser(session: Session | null) {
if (!session) return null
const { id } = session
const user = await User.findByPk(id)
return user
}