diff options
Diffstat (limited to 'lib/bidding/detail/service.ts')
| -rw-r--r-- | lib/bidding/detail/service.ts | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/bidding/detail/service.ts b/lib/bidding/detail/service.ts index e49c0628..06030c8a 100644 --- a/lib/bidding/detail/service.ts +++ b/lib/bidding/detail/service.ts @@ -900,13 +900,11 @@ export async function registerBidding(biddingId: number, userId: string) { } } } - // 캐시 무효화 - revalidateTag(`bidding-${biddingId}`) - revalidateTag('bidding-detail') - revalidateTag('quotation-vendors') - revalidateTag('quotation-details') - revalidateTag('pr-items') - revalidatePath(`/evcp/bid/${biddingId}`) + // 캐시 무효화 (API를 통한 방식) + const { revalidateViaCronJob } = await import('@/lib/revalidation-utils'); + await revalidateViaCronJob({ + tags: [`bidding-${biddingId}`, 'bidding-detail', 'quotation-vendors', 'quotation-details', 'pr-items'] + }); return { success: true, @@ -1270,9 +1268,9 @@ async function updateBiddingAmounts(biddingId: number) { await db .update(biddings) .set({ - targetPrice: totalTargetAmount, - budget: totalBudgetAmount, - finalBidPrice: totalActualAmount, + targetPrice: totalTargetAmount.toString(), + budget: totalBudgetAmount.toString(), + finalBidPrice: totalActualAmount.toString(), updatedAt: new Date() }) .where(eq(biddings.id, biddingId)) |
