diff --git a/api/server/handlers/datastore/update.go b/api/server/handlers/datastore/update.go index d8a56a9e93..6e077a312d 100644 --- a/api/server/handlers/datastore/update.go +++ b/api/server/handlers/datastore/update.go @@ -162,17 +162,13 @@ func (h *UpdateDatastoreHandler) ServeHTTP(w http.ResponseWriter, r *http.Reques return } - req := connect.NewRequest(&porterv1.PatchCloudContractRequest{ - ProjectId: int64(project.ID), - Operation: porterv1.EnumPatchCloudContractOperation_ENUM_PATCH_CLOUD_CONTRACT_OPERATION_UPDATE, - ResourceType: porterv1.EnumPatchCloudContractType_ENUM_PATCH_CLOUD_CONTRACT_TYPE_DATASTORE, - ResourceValues: &porterv1.PatchCloudContractRequest_Datastore{ - Datastore: datastoreProto, - }, + req := connect.NewRequest(&porterv1.UpdateDatastoreRequest{ + ProjectId: int64(project.ID), + Datastore: datastoreProto, }) - _, err = h.Config().ClusterControlPlaneClient.PatchCloudContract(ctx, req) + _, err = h.Config().ClusterControlPlaneClient.UpdateDatastore(ctx, req) if err != nil { - err = telemetry.Error(ctx, span, err, "error patching cloud contract") + err = telemetry.Error(ctx, span, err, "error updating datastore") h.HandleAPIError(w, r, apierrors.NewErrPassThroughToClient(err, http.StatusInternalServerError)) return } diff --git a/go.mod b/go.mod index 7a35c393e8..29d40c4016 100644 --- a/go.mod +++ b/go.mod @@ -85,7 +85,7 @@ require ( github.com/matryer/is v1.4.0 github.com/nats-io/nats.go v1.24.0 github.com/open-policy-agent/opa v0.44.0 - github.com/porter-dev/api-contracts v0.2.139 + github.com/porter-dev/api-contracts v0.2.140 github.com/riandyrn/otelchi v0.5.1 github.com/santhosh-tekuri/jsonschema/v5 v5.0.1 github.com/stefanmcshane/helm v0.0.0-20221213002717-88a4a2c6e77d diff --git a/go.sum b/go.sum index e243cf5bab..9e35b9bdbb 100644 --- a/go.sum +++ b/go.sum @@ -1552,8 +1552,8 @@ github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polyfloyd/go-errorlint v0.0.0-20210722154253-910bb7978349/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= -github.com/porter-dev/api-contracts v0.2.139 h1:nTL/tRqXus1O5C524Oo+/cZ62jEVIUI75odYkIvswHY= -github.com/porter-dev/api-contracts v0.2.139/go.mod h1:VV5BzXd02ZdbWIPLVP+PX3GKawJSGQnxorVT2sUZALU= +github.com/porter-dev/api-contracts v0.2.140 h1:AkAEAhcg7VsrkMxCInRtlYQbik/p+KvOUEri3IZLtek= +github.com/porter-dev/api-contracts v0.2.140/go.mod h1:VV5BzXd02ZdbWIPLVP+PX3GKawJSGQnxorVT2sUZALU= github.com/porter-dev/switchboard v0.0.3 h1:dBuYkiVLa5Ce7059d6qTe9a1C2XEORFEanhbtV92R+M= github.com/porter-dev/switchboard v0.0.3/go.mod h1:xSPzqSFMQ6OSbp42fhCi4AbGbQbsm6nRvOkrblFeXU4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=