Skip to content

Commit

Permalink
chore: change PUT to PATCH in updateService
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanya-atatakai committed Dec 20, 2024
1 parent 10a247c commit 19cd810
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion frontend/service/Services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const updateService = async ({
useMechMarketplace?: boolean;
}): Promise<MiddlewareServiceResponse> =>
fetch(`${BACKEND_URL_V2}/service/${serviceConfigId}`, {
method: 'PUT',
method: 'PATCH',
body: JSON.stringify({
...serviceTemplate,
deploy,
Expand Down

0 comments on commit 19cd810

Please sign in to comment.