Allow users to delete TablesDB database when enableSDKOperations feature flag is set (#1300)

This commit is contained in:
victor-meng
2022-07-06 10:54:49 -07:00
committed by GitHub
parent 0996489897
commit d66e85f431
24 changed files with 80 additions and 33 deletions

View File

@@ -12,7 +12,7 @@ import { handleError } from "../ErrorHandlingUtils";
export async function deleteCollection(databaseId: string, collectionId: string): Promise<void> {
const clearMessage = logConsoleProgress(`Deleting container ${collectionId}`);
try {
if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations) {
if (userContext.authType === AuthType.AAD && !userContext.features.enableSDKoperations) {
await deleteCollectionWithARM(databaseId, collectionId);
} else {
await client().database(databaseId).container(collectionId).delete();