261013_01_HOT: 리스트 엑셀 업로드·다운로드 및 컨택이력 다운로드 timeout 5분으로 연장
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import {RouteContext} from "@/types/common";
|
||||
import {createContactApi} from "@/lib/http-server";
|
||||
import {errorToResponse} from "@kri/common/http";
|
||||
import {listHeader, ListSearchRequest, ListSearchWithFullResult} from "@/types/list";
|
||||
import {LIST_EXCEL_TIMEOUT_MS} from "@/const/listConst";
|
||||
|
||||
const excelHeaders = {
|
||||
"Content-Type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
@@ -102,7 +103,9 @@ export const POST = async (req: NextRequest, context: RouteContext) => {
|
||||
|
||||
if (action === "excel-upload") {
|
||||
const form = await req.formData();
|
||||
const result = await contactApi.postForm(`/list/excel/upload/${slug[1]}`, form);
|
||||
const result = await contactApi.postForm(`/list/excel/upload/${slug[1]}`, form, {
|
||||
timeoutMs: LIST_EXCEL_TIMEOUT_MS,
|
||||
});
|
||||
return NextResponse.json(result, { status: 200 });
|
||||
}
|
||||
|
||||
@@ -112,7 +115,7 @@ export const POST = async (req: NextRequest, context: RouteContext) => {
|
||||
const result = await contactApi.post<ArrayBuffer>(
|
||||
`/list/excel/download/${slug[1]}?includeResult=${includeResult}`,
|
||||
body,
|
||||
{ expectBinary: true },
|
||||
{ expectBinary: true, timeoutMs: LIST_EXCEL_TIMEOUT_MS },
|
||||
);
|
||||
return new NextResponse(result, { status: 200, headers: excelHeaders });
|
||||
}
|
||||
@@ -131,7 +134,7 @@ export const POST = async (req: NextRequest, context: RouteContext) => {
|
||||
const result = await contactApi.post<ArrayBuffer>(
|
||||
`/list-hist/excel/download/event/${slug[1]}?includeResult=${includeResult}`,
|
||||
body,
|
||||
{ expectBinary: true },
|
||||
{ expectBinary: true, timeoutMs: LIST_EXCEL_TIMEOUT_MS },
|
||||
);
|
||||
return new NextResponse(result, { status: 200, headers: excelHeaders });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user