플로우 외부연결 중간커밋
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user