diff --git a/web/frontend/src/api.ts b/web/frontend/src/api.ts index 7c27ef9..1002848 100644 --- a/web/frontend/src/api.ts +++ b/web/frontend/src/api.ts @@ -190,7 +190,7 @@ export interface ProjectLink { id: number from_project: string to_project: string - link_type: string + type: string description: string | null created_at: string } @@ -415,7 +415,7 @@ export const api = { get(`/pipelines/${pipelineId}/logs?since_id=${sinceId}`), projectLinks: (projectId: string) => get(`/projects/${projectId}/links`), - createProjectLink: (data: { from_project: string; to_project: string; link_type: string; description?: string }) => + createProjectLink: (data: { from_project: string; to_project: string; type: string; description?: string }) => post('/project-links', data), deleteProjectLink: (id: number) => del(`/project-links/${id}`), diff --git a/web/frontend/src/views/ProjectView.vue b/web/frontend/src/views/ProjectView.vue index 2c4b7be..01f5f0f 100644 --- a/web/frontend/src/views/ProjectView.vue +++ b/web/frontend/src/views/ProjectView.vue @@ -395,7 +395,7 @@ const links = ref([]) const linksLoading = ref(false) const linksError = ref('') const showAddLink = ref(false) -const linkForm = ref({ to_project: '', link_type: 'depends_on', description: '' }) +const linkForm = ref({ to_project: '', type: 'depends_on', description: '' }) const linkFormError = ref('') const linkSaving = ref(false) @@ -419,11 +419,11 @@ async function addLink() { await api.createProjectLink({ from_project: props.id, to_project: linkForm.value.to_project, - link_type: linkForm.value.link_type, + type: linkForm.value.type, description: linkForm.value.description || undefined, }) showAddLink.value = false - linkForm.value = { to_project: '', link_type: 'depends_on', description: '' } + linkForm.value = { to_project: '', type: 'depends_on', description: '' } await loadLinks() } catch (e: any) { linkFormError.value = e.message @@ -1368,7 +1368,7 @@ async function addDecision() { {{ link.from_project }} -> {{ link.to_project }} - {{ link.link_type }} + {{ link.type }} {{ link.description }}