mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-02-22 08:22:01 +00:00
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 3m9s
16 lines
351 B
TypeScript
16 lines
351 B
TypeScript
"use server";
|
|
import { headers } from "next/headers";
|
|
import { cache } from "react";
|
|
import { auth } from "./auth";
|
|
|
|
const getCurrentUserCache = cache(async () => {
|
|
const session = await auth.api.getSession({
|
|
headers: await headers(),
|
|
});
|
|
return session?.user;
|
|
});
|
|
|
|
export async function getCurrentUser() {
|
|
return await getCurrentUserCache();
|
|
}
|