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

@@ -25,7 +25,8 @@ export async function createDatabase(params: DataModels.CreateDatabaseParams): P
if (userContext.apiType === "Tables") {
throw new Error("Creating database resources is not allowed for tables accounts");
}
const database: DataModels.Database = await (userContext.authType === AuthType.AAD && !userContext.useSDKOperations
const database: DataModels.Database = await (userContext.authType === AuthType.AAD &&
!userContext.features.enableSDKoperations
? createDatabaseWithARM(params)
: createDatabaseWithSDK(params));