Files
sarlink-portal/lib/person.ts
i701 9b2f2c1528
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s
add admin checks for admin pages and run biome formating 🔨
2025-07-25 13:31:12 +05:00

20 lines
428 B
TypeScript

"use server";
import type { TNationalPerson } from "@/lib/types";
export async function getNationalPerson({
idCard,
}: {
idCard: string;
}): Promise<TNationalPerson> {
const nationalInformation = await fetch(
`${process.env.PERSON_VERIFY_BASE_URL}/api/person/${idCard}`,
{
next: {
revalidate: 60,
},
},
);
const nationalData = (await nationalInformation.json()) as TNationalPerson;
return nationalData;
}