diff --git a/frontend/components/MainPage/header/AgentButton/AgentNotRunningButton.tsx b/frontend/components/MainPage/header/AgentButton/AgentNotRunningButton.tsx index bee5fb72..1833da2b 100644 --- a/frontend/components/MainPage/header/AgentButton/AgentNotRunningButton.tsx +++ b/frontend/components/MainPage/header/AgentButton/AgentNotRunningButton.tsx @@ -248,6 +248,10 @@ const useServiceDeployment = () => { } // Update the service if the hash is different + // TODO: "updateService" now uses PATCH instead of PUT, + // which means it updates only the provided values. + // Ideally we should consider rewriting this code + // so that only hash value is passed if (!middlewareServiceResponse && service) { if (service.hash !== serviceTemplate.hash) { await ServicesService.updateService({ diff --git a/frontend/service/Services.ts b/frontend/service/Services.ts index 32bc2196..61c3b264 100644 --- a/frontend/service/Services.ts +++ b/frontend/service/Services.ts @@ -109,7 +109,7 @@ const updateService = async ({ useMechMarketplace?: boolean; }): Promise => fetch(`${BACKEND_URL_V2}/service/${serviceConfigId}`, { - method: 'PUT', + method: 'PATCH', body: JSON.stringify({ ...serviceTemplate, deploy,