플로우 외부연결 중간커밋

This commit is contained in:
kjs
2025-10-21 13:19:18 +09:00
parent 967f9a9f5b
commit 0d96ea566b
12 changed files with 1667 additions and 100 deletions

View File

@@ -34,23 +34,31 @@ export class FlowController {
const { name, description, tableName } = req.body;
const userId = (req as any).user?.userId || "system";
if (!name || !tableName) {
console.log("🔍 createFlowDefinition called with:", {
name,
description,
tableName,
});
if (!name) {
res.status(400).json({
success: false,
message: "Name and tableName are required",
message: "Name is required",
});
return;
}
// 테이블 존재 확인
const tableExists =
await this.flowDefinitionService.checkTableExists(tableName);
if (!tableExists) {
res.status(400).json({
success: false,
message: `Table '${tableName}' does not exist`,
});
return;
// 테이블 이름이 제공된 경우에만 존재 확인
if (tableName) {
const tableExists =
await this.flowDefinitionService.checkTableExists(tableName);
if (!tableExists) {
res.status(400).json({
success: false,
message: `Table '${tableName}' does not exist`,
});
return;
}
}
const flowDef = await this.flowDefinitionService.create(