Files
eu/lib/user.ts
T
2026-06-23 15:32:52 +03:00

15 lines
454 B
TypeScript

import { getSessionUserId } from "@/lib/auth/session";
import { findUserById } from "@/lib/user/repository";
import { fetchKotosoftUser } from "./kotosoft/client";
import { cookies } from "next/headers";
export async function getCurrentUser() {
const userId = await getSessionUserId();
if (!userId) return null;
return findUserById(userId);
}
export async function getUser(id: string | null) {
if (!id) return null;
return findUserById(id);
}