feat: 배치 관리 시스템 테스트 및 업데이트 기능 개선
- 배치 스케줄러 서비스 안정성 향상 - 외부 DB 연결 서비스 개선 - 배치 컨트롤러 및 관리 컨트롤러 업데이트 - 프론트엔드 배치 관리 페이지 개선 - Prisma 스키마 업데이트
This commit is contained in:
@@ -120,23 +120,39 @@ class BatchManagementAPIClass {
|
||||
apiUrl: string,
|
||||
apiKey: string,
|
||||
endpoint: string,
|
||||
method: 'GET' = 'GET'
|
||||
method: 'GET' = 'GET',
|
||||
paramInfo?: {
|
||||
paramType: 'url' | 'query';
|
||||
paramName: string;
|
||||
paramValue: string;
|
||||
paramSource: 'static' | 'dynamic';
|
||||
}
|
||||
): Promise<{
|
||||
fields: string[];
|
||||
samples: any[];
|
||||
totalCount: number;
|
||||
}> {
|
||||
try {
|
||||
const response = await apiClient.post<BatchApiResponse<{
|
||||
fields: string[];
|
||||
samples: any[];
|
||||
totalCount: number;
|
||||
}>>(`${this.BASE_PATH}/rest-api/preview`, {
|
||||
const requestData: any = {
|
||||
apiUrl,
|
||||
apiKey,
|
||||
endpoint,
|
||||
method
|
||||
});
|
||||
};
|
||||
|
||||
// 파라미터 정보가 있으면 추가
|
||||
if (paramInfo) {
|
||||
requestData.paramType = paramInfo.paramType;
|
||||
requestData.paramName = paramInfo.paramName;
|
||||
requestData.paramValue = paramInfo.paramValue;
|
||||
requestData.paramSource = paramInfo.paramSource;
|
||||
}
|
||||
|
||||
const response = await apiClient.post<BatchApiResponse<{
|
||||
fields: string[];
|
||||
samples: any[];
|
||||
totalCount: number;
|
||||
}>>(`${this.BASE_PATH}/rest-api/preview`, requestData);
|
||||
|
||||
if (!response.data.success) {
|
||||
throw new Error(response.data.message || "REST API 미리보기에 실패했습니다.");
|
||||
|
||||
Reference in New Issue
Block a user