260625_08_ENH: 서면 평가원 화면에서 모니터링은 1개로 합치고 그에따른 상태값 처리 및 zip 다운로드 적용

This commit is contained in:
2026-06-25 15:49:06 +09:00
parent f6c9a013b5
commit 03e9e2c2f1
3 changed files with 74 additions and 3 deletions

View File

@@ -73,6 +73,21 @@ export const GET = async (
});
}
if (action === "download" && second && third && slug.length === 3) {
const result = await backApi.get<ArrayBuffer>(
`/review/download/${encodeURIComponent(second)}/${encodeURIComponent(third)}`,
{ expectBinary: true }
);
return new NextResponse(result, {
status: 200,
headers: {
"Content-Type": "application/octet-stream",
"Content-Disposition": `attachment; filename="${reviewFileName("review-original", second, third)}"`,
},
});
}
if (action === "pdf" && second && third && fourth && slug.length === 4) {
const result = await backApi.get<ArrayBuffer>(
`/review/pdf/${encodeURIComponent(second)}/${encodeURIComponent(third)}/${encodeURIComponent(fourth)}`,