Merge branch 'jskim-node' of http://39.117.244.52:3000/kjs/ERP-node into gbpark-node

; Please enter a commit message to explain why this merge is necessary,
; especially if it merges an updated upstream into a topic branch.
;
; Lines starting with ';' will be ignored, and an empty message aborts
; the commit.
This commit is contained in:
DDD1542
2026-02-22 20:54:59 +09:00
4 changed files with 183 additions and 14 deletions

View File

@@ -1357,7 +1357,7 @@ class DataService {
userId?: string,
deleteOrphans: boolean = true
): Promise<
ServiceResponse<{ inserted: number; updated: number; deleted: number }>
ServiceResponse<{ inserted: number; updated: number; deleted: number; savedIds?: any[] }>
> {
try {
// 테이블 접근 권한 검증

View File

@@ -1290,6 +1290,11 @@ export class DynamicFormService {
return res.rows;
});
// 삭제된 행이 없으면 레코드를 찾을 수 없는 것
if (!result || !Array.isArray(result) || result.length === 0) {
throw new Error(`테이블 ${tableName}에서 ID '${id}'에 해당하는 레코드를 찾을 수 없습니다.`);
}
console.log("✅ 서비스: 실제 테이블 삭제 성공:", result);
// 🔥 조건부 연결 실행 (DELETE 트리거)