diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-01 13:52:21 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-01 13:52:21 +0000 |
| commit | bac0228d21b7195065e9cddcc327ae33659c7bcc (patch) | |
| tree | 8f3016ae4533c8706d0c00a605d9b1d41968c2bc /lib/vendor-document-list/enhanced-document-service.ts | |
| parent | 2fdce8d7a57c792bba0ac36fa554dca9c9cc31e3 (diff) | |
(대표님) 20250601까지 작업사항
Diffstat (limited to 'lib/vendor-document-list/enhanced-document-service.ts')
| -rw-r--r-- | lib/vendor-document-list/enhanced-document-service.ts | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/lib/vendor-document-list/enhanced-document-service.ts b/lib/vendor-document-list/enhanced-document-service.ts index 00f40ea6..d39dfaa4 100644 --- a/lib/vendor-document-list/enhanced-document-service.ts +++ b/lib/vendor-document-list/enhanced-document-service.ts @@ -86,8 +86,8 @@ export async function getEnhancedDocuments( input: GetEnhancedDocumentsSchema, contractId: number ) { - return unstable_cache( - async () => { + // return unstable_cache( + // async () => { try { const offset = (input.page - 1) * input.perPage @@ -140,6 +140,8 @@ export async function getEnhancedDocuments( return { data, total } }) + console.log(data) + const pageCount = Math.ceil(total / input.perPage) return { data, pageCount, total } @@ -147,19 +149,19 @@ export async function getEnhancedDocuments( console.error("Error fetching enhanced documents:", err) return { data: [], pageCount: 0, total: 0 } } - }, - [JSON.stringify(input), String(contractId)], - { - revalidate: 3600, - tags: [`enhanced-documents-${contractId}`], - } - )() + // }, + // [JSON.stringify(input), String(contractId)], + // { + // revalidate: 3600, + // tags: [`enhanced-documents-${contractId}`], + // } + // )() } // 통계 데이터 가져오기 export async function getDocumentStatistics(contractId: number) { - return unstable_cache( - async () => { + // return unstable_cache( + // async () => { try { const result = await db .select({ @@ -229,13 +231,13 @@ export async function getDocumentStatistics(contractId: number) { avgProgress: 0, } } - }, - [`document-stats-${contractId}`], - { - revalidate: 1800, // 30분 캐시 - tags: [`document-stats-${contractId}`], - } - )() + // }, + // [`document-stats-${contractId}`], + // { + // revalidate: 1800, // 30분 캐시 + // tags: [`document-stats-${contractId}`], + // } + // )() } // 빠른 필터 데이터 |
