mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-02-22 23:02:01 +00:00
11 lines
230 B
TypeScript
11 lines
230 B
TypeScript
|
"use server";
|
||
|
import { headers } from "next/headers";
|
||
|
import { auth } from "./auth";
|
||
|
|
||
|
export async function getCurrentUser() {
|
||
|
const session = await auth.api.getSession({
|
||
|
headers: await headers(),
|
||
|
});
|
||
|
return session?.user;
|
||
|
}
|