Added rough button to command bar to allow switching of client endpoint.

This commit is contained in:
Craig Boger (from Dev Box)
2024-01-31 17:13:05 -08:00
parent 0b37369812
commit 2b4a4d0d61
3 changed files with 106 additions and 14 deletions

View File

@@ -265,25 +265,13 @@ async function configureHostedWithAAD(config: AAD): Promise<Explorer> {
throw new Error(`List keys failed: ${e.message}`);
}
}
// Updating database account endpoint for testing purposes.
const updatedDatabaseAccount = {
...config.databaseAccount,
properties: {
...config.databaseAccount.properties,
documentEndpoint: "https://test-craig-nosql-periodic.documents.azure.com:443/",
},
};
updateUserContext({
subscriptionId,
resourceGroup,
aadToken,
databaseAccount: updatedDatabaseAccount,
databaseAccount: config.databaseAccount,
masterKey: keys.primaryMasterKey,
});
console.log(`INITIALIZED ENDPOINT: ${JSON.stringify(userContext.databaseAccount.properties.documentEndpoint)}`);
userContext.databaseAccount.properties.readLocations.forEach((readLocation) => {
console.log(`REGIONAL READ ENDPOINT(S): ${JSON.stringify(readLocation)}`);
});
const explorer = new Explorer();
return explorer;
}