Switch back to SDK for deleteDatabase and use RP for readCollections for table API (#155)

This commit is contained in:
victor-meng 2020-08-18 11:04:37 -07:00 committed by GitHub
parent 3279460cfd
commit 951289e190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -15,7 +15,7 @@ export async function deleteDatabase(databaseId: string): Promise<void> {
const clearMessage = logConsoleProgress(`Deleting database ${databaseId}`);
try {
if (window.authType === AuthType.AAD) {
if (window.authType === AuthType.AAD && userContext.defaultExperience !== DefaultAccountExperienceType.Table) {
await deleteDatabaseWithARM(databaseId);
} else {
await client()

View File

@ -16,11 +16,7 @@ export async function readCollections(databaseId: string): Promise<DataModels.Co
let collections: DataModels.Collection[];
const clearMessage = logConsoleProgress(`Querying containers for database ${databaseId}`);
try {
if (
window.authType === AuthType.AAD &&
userContext.defaultExperience !== DefaultAccountExperienceType.MongoDB &&
userContext.defaultExperience !== DefaultAccountExperienceType.Table
) {
if (window.authType === AuthType.AAD && userContext.defaultExperience !== DefaultAccountExperienceType.MongoDB) {
collections = await readCollectionsWithARM(databaseId);
} else {
const sdkResponse = await client()