데이터 관계 수정 시 라우트 변경

This commit is contained in:
hyeonsu
2025-09-09 13:48:57 +09:00
parent 142cfe022b
commit 7bcd405a04
7 changed files with 244 additions and 13 deletions

View File

@@ -89,6 +89,7 @@ export interface TableDataResponse {
// 관계도 정보 인터페이스
export interface DataFlowDiagram {
relationshipId: number;
diagramName: string;
connectionType: string;
relationshipType: string;
@@ -377,7 +378,7 @@ export class DataFlowAPI {
}
}
// 특정 관계도의 모든 관계 조회
// 특정 관계도의 모든 관계 조회 (관계도명으로)
static async getDiagramRelationships(diagramName: string): Promise<TableRelationship[]> {
try {
const encodedDiagramName = encodeURIComponent(diagramName);
@@ -433,4 +434,22 @@ export class DataFlowAPI {
throw error;
}
}
// 특정 관계도의 모든 관계 조회 (relationship_id로)
static async getDiagramRelationshipsByRelationshipId(relationshipId: string): Promise<TableRelationship[]> {
try {
const response = await apiClient.get<ApiResponse<TableRelationship[]>>(
`/dataflow/relationships/${relationshipId}/diagram`,
);
if (!response.data.success) {
throw new Error(response.data.message || "관계도 관계 조회에 실패했습니다.");
}
return response.data.data || [];
} catch (error) {
console.error("관계도 관계 조회 오류:", error);
throw error;
}
}
}