mirror of
				https://github.com/i701/sarlink-portal.git
				synced 2025-11-04 06:26:59 +00:00 
			
		
		
		
	
		
			All checks were successful
		
		
	
	Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s
				
			
		
			
				
	
	
		
			20 lines
		
	
	
		
			428 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			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;
 | 
						|
}
 |