260915_01_ENH: 다운로드 결과값 포함 및 컨택 이력 정렬 옵션 추가

This commit is contained in:
2026-09-15 12:30:52 +09:00
parent effe279be9
commit b543d66186
5 changed files with 73 additions and 10 deletions

View File

@@ -108,7 +108,12 @@ export const POST = async (req: NextRequest, context: RouteContext) => {
if (action === "excel-download") {
const body = await req.json().catch(() => null);
const result = await contactApi.post<ArrayBuffer>(`/list/excel/download/${slug[1]}`, body, { expectBinary: true });
const includeResult = req.nextUrl.searchParams.get("includeResult") !== "false";
const result = await contactApi.post<ArrayBuffer>(
`/list/excel/download/${slug[1]}?includeResult=${includeResult}`,
body,
{ expectBinary: true },
);
return new NextResponse(result, { status: 200, headers: excelHeaders });
}
@@ -122,9 +127,12 @@ export const POST = async (req: NextRequest, context: RouteContext) => {
if (action === "event-history-download") {
const body = await req.json().catch(() => null);
const result = await contactApi.post<ArrayBuffer>(`/list-hist/excel/download/event/${slug[1]}`, body, {
expectBinary: true,
});
const includeResult = req.nextUrl.searchParams.get("includeResult") !== "false";
const result = await contactApi.post<ArrayBuffer>(
`/list-hist/excel/download/event/${slug[1]}?includeResult=${includeResult}`,
body,
{ expectBinary: true },
);
return new NextResponse(result, { status: 200, headers: excelHeaders });
}