diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-09-16 09:20:58 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-09-16 09:20:58 +0000 |
| commit | 6c11fccc84f4c84fa72ee01f9caad9f76f35cea2 (patch) | |
| tree | fa88d10ea7d21fe6b59ed0c1569856a73d56547a /app | |
| parent | 14e3990aba7e1ad1cdd0965cbd167c50230cbfbf (diff) | |
(대표님, 최겸) 계약, 업로드 관련, 메뉴처리, 입찰, 프리쿼트, rfqLast관련, tbeLast관련
Diffstat (limited to 'app')
| -rw-r--r-- | app/api/contracts/get-template/route.ts | 8 | ||||
| -rw-r--r-- | app/api/upload/signed-contract/route.ts | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/app/api/contracts/get-template/route.ts b/app/api/contracts/get-template/route.ts index c987c527..ff42196f 100644 --- a/app/api/contracts/get-template/route.ts +++ b/app/api/contracts/get-template/route.ts @@ -12,8 +12,14 @@ export async function POST(request: NextRequest) { { status: 400 } ); } + const isDev = process.env.NODE_ENV === 'development'; - const fullPath = path.join(process.cwd(), `${process.env.NAS_PATH}`, templatePath); + const fullPath = + isDev ? + path.join(process.cwd(), `public`, templatePath) + : + path.join(`${process.env.NAS_PATH}`, templatePath); + const fileBuffer = await readFile(fullPath); return new NextResponse(fileBuffer, { diff --git a/app/api/upload/signed-contract/route.ts b/app/api/upload/signed-contract/route.ts index 8547f0e4..873f21e5 100644 --- a/app/api/upload/signed-contract/route.ts +++ b/app/api/upload/signed-contract/route.ts @@ -49,7 +49,7 @@ export async function POST(request: NextRequest) { fileName: saveResult.originalName || originalFileName, // 원본 파일명 filePath: saveResult.publicPath, // 웹 접근 가능한 경로 updatedAt: new Date(), - completedAt: new Date() + completedAt: null }) .where(eq(basicContract.id, tableRowId)); }); |
