"use server" import { revalidatePath } from "next/cache" import { languages } from "@/i18n/settings" /** * 지정된 base 경로에 대해 지원 언어별로 revalidatePath를 호출합니다. * 예: basePath가 "/evcp/approval/line" 이면 * - /ko/evcp/approval/line * - /en/evcp/approval/line * 등의 경로를 무효화합니다. */ export async function revalidateI18nPaths(basePath: string): Promise { for (const lng of languages) { try { revalidatePath(`/${lng}${basePath}`) } catch { // ignore } } } /** * 여러 base 경로를 한 번에 무효화합니다. */ export async function revalidateI18nPathsMany(basePaths: string[]): Promise { for (const basePath of basePaths) { await revalidateI18nPaths(basePath) } }