From 61b59f5526777da9c7894aa385966c3862275404 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 8 Sep 2025 11:19:16 +0000 Subject: (최겸) 구매 법무검토 스킵 후 구매자 서명 기능 오류 수정(saveFile -> saveBuffer 함수 사용) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/basic-contract/service.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'lib/basic-contract') diff --git a/lib/basic-contract/service.ts b/lib/basic-contract/service.ts index 057526cf..eeb086de 100644 --- a/lib/basic-contract/service.ts +++ b/lib/basic-contract/service.ts @@ -2871,8 +2871,18 @@ export async function processBuyerSignatureAction( } // 파일 저장 로직 (기존 파일 덮어쓰기) - // TODO: 실제 파일 저장 구현 - const saveResult = await saveFile({signedFileData,directory: "basicContract/signed" }); + const saveResult = await saveBuffer({ + buffer: signedFileData, + fileName: fileName, + directory: "basicContract/signed" + }); + + if (!saveResult.success) { + return { + success: false, + message: `파일 저장 중 오류가 발생했습니다: ${saveResult.error}` + } + } const currentDate = new Date() @@ -2884,7 +2894,7 @@ export async function processBuyerSignatureAction( completedAt: currentDate, status: "COMPLETED", updatedAt: currentDate, - // signedFilePath: savedFilePath, // 새로운 파일 경로로 업데이트 + filePath: saveResult.filePath, // 새로운 파일 경로로 업데이트 }) .where(eq(basicContract.id, contractId)) .returning() -- cgit v1.2.3