From b480c635cac5cbcb9d61fd8a2c88a6ee92b7b584 Mon Sep 17 00:00:00 2001 From: Asier Isayas Date: Thu, 29 Feb 2024 12:10:15 -0500 Subject: [PATCH] fix create mongo collection and delete mongo document switching (#1758) Co-authored-by: Asier Isayas --- src/Common/MongoProxyClient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/MongoProxyClient.ts b/src/Common/MongoProxyClient.ts index 2a3671f7c..357ce1f50 100644 --- a/src/Common/MongoProxyClient.ts +++ b/src/Common/MongoProxyClient.ts @@ -465,7 +465,7 @@ export function updateDocument_ToBeDeprecated( export function deleteDocument(databaseId: string, collection: Collection, documentId: DocumentId): Promise { if (!useMongoProxyEndpoint("deleteDocument")) { - deleteDocument_ToBeDeprecated(databaseId, collection, documentId); + return deleteDocument_ToBeDeprecated(databaseId, collection, documentId); } const { databaseAccount } = userContext; const resourceEndpoint = databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint; @@ -554,7 +554,7 @@ export function createMongoCollectionWithProxy( params: DataModels.CreateCollectionParams, ): Promise { if (!useMongoProxyEndpoint("createCollectionWithProxy")) { - createMongoCollectionWithProxy_ToBeDeprecated(params); + return createMongoCollectionWithProxy_ToBeDeprecated(params); } const { databaseAccount } = userContext; const shardKey: string = params.partitionKey?.paths[0];