테스트 프로젝트 테이블 생성 및 오류들 수정
This commit is contained in:
@@ -11,8 +11,8 @@ export const saveFormData = async (
|
||||
const { companyCode, userId } = req.user as any;
|
||||
const { screenId, tableName, data } = req.body;
|
||||
|
||||
// 필수 필드 검증
|
||||
if (!screenId || !tableName || !data) {
|
||||
// 필수 필드 검증 (screenId는 0일 수 있으므로 undefined 체크)
|
||||
if (screenId === undefined || screenId === null || !tableName || !data) {
|
||||
return res.status(400).json({
|
||||
success: false,
|
||||
message: "필수 필드가 누락되었습니다. (screenId, tableName, data)",
|
||||
@@ -80,7 +80,7 @@ export const updateFormData = async (
|
||||
};
|
||||
|
||||
const result = await dynamicFormService.updateFormData(
|
||||
parseInt(id),
|
||||
id, // parseInt 제거 - 문자열 ID 지원
|
||||
tableName,
|
||||
formDataWithMeta
|
||||
);
|
||||
@@ -168,7 +168,7 @@ export const deleteFormData = async (
|
||||
});
|
||||
}
|
||||
|
||||
await dynamicFormService.deleteFormData(parseInt(id), tableName);
|
||||
await dynamicFormService.deleteFormData(id, tableName); // parseInt 제거 - 문자열 ID 지원
|
||||
|
||||
res.json({
|
||||
success: true,
|
||||
|
||||
Reference in New Issue
Block a user