diff --git a/apps/agent/src/common/AgentUIVersion.tsx b/apps/agent/src/common/AgentUIVersion.tsx index dea054e..65d3dbe 100644 --- a/apps/agent/src/common/AgentUIVersion.tsx +++ b/apps/agent/src/common/AgentUIVersion.tsx @@ -2,11 +2,10 @@ import React, { useState, useEffect } from 'react'; import type { AgentApiInterface } from "@migration-planner-ui/agent-client/apis"; import { useInjection } from '@migration-planner-ui/ioc'; import { Symbols } from '#/main/Symbols'; -import { StatusReply } from '@migration-planner-ui/agent-client/models'; export const AgentUIVersion: React.FC = () => { const agentApi = useInjection(Symbols.AgentApi); - const [versionInfo, setVersionInfo] = useState(null); + const [versionInfo, setVersionInfo] = useState(null); const [error, setError] = useState(null); useEffect(() => { @@ -33,7 +32,7 @@ export const AgentUIVersion: React.FC = () => { return ( ); }; \ No newline at end of file diff --git a/packages/agent-client/src/apis/AgentApi.ts b/packages/agent-client/src/apis/AgentApi.ts index b11be7a..b42282f 100644 --- a/packages/agent-client/src/apis/AgentApi.ts +++ b/packages/agent-client/src/apis/AgentApi.ts @@ -15,7 +15,7 @@ export interface AgentApiInterface { options?: RequestInit & { pathParams?: string[] } ): Promise>; getStatus(options?: RequestInit): Promise; - getAgentVersion():Promise; + getAgentVersion():Promise; } export class AgentApi implements AgentApiInterface { @@ -61,13 +61,13 @@ export class AgentApi implements AgentApiInterface { } } - async getAgentVersion(): Promise { + async getAgentVersion(): Promise { const request = new Request(this.configuration.basePath + "/version", { method: "GET" }); const response = await fetch(request); - const statusReply = (await response.json()) as StatusReply; - return statusReply; + const statusReply = (await response.json()) as { version: string }; + return statusReply.version; } }