From ef4c533ebacc2cdc97e518f30e9a9350004fcdfb Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 28 Apr 2025 02:13:30 +0000 Subject: ~20250428 작업사항 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/cron/object-classes/route.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/api/cron/object-classes') diff --git a/app/api/cron/object-classes/route.ts b/app/api/cron/object-classes/route.ts index 9a574b1b..6743da70 100644 --- a/app/api/cron/object-classes/route.ts +++ b/app/api/cron/object-classes/route.ts @@ -1,6 +1,7 @@ // src/app/api/cron/object-classes/route.ts import { syncObjectClasses } from '@/lib/sedp/sync-object-class'; import { NextRequest } from 'next/server'; +import { revalidateTag } from 'next/cache'; export async function GET(request: NextRequest) { try { @@ -8,7 +9,8 @@ export async function GET(request: NextRequest) { // syncObjectClasses 함수 호출 const result = await syncObjectClasses(); - + revalidateTag("equip-class") + // 성공 시 결과와 함께 200 OK 반환 return Response.json({ success: true, result }, { status: 200 }); } catch (error: any) { -- cgit v1.2.3