260915_01_ENH: 다운로드 결과값 포함 및 컨택 이력 정렬 옵션 추가
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user