mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
11 lines
No EOL
254 B
TypeScript
11 lines
No EOL
254 B
TypeScript
|
|
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
|
|
} |