mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 23:16:56 +00:00
Fix create and delete database (#317)
This commit is contained in:
parent
79dec6a8a8
commit
a133134b8b
@ -296,12 +296,16 @@ export default class AddDatabasePane extends ContextualPaneBase {
|
||||
this.isExecuting(true);
|
||||
|
||||
const createDatabaseParams: DataModels.CreateDatabaseParams = {
|
||||
autoPilotMaxThroughput: this.maxAutoPilotThroughputSet(),
|
||||
databaseId: addDatabasePaneStartMessage.database.id,
|
||||
databaseLevelThroughput: addDatabasePaneStartMessage.database.shared,
|
||||
offerThroughput: addDatabasePaneStartMessage.offerThroughput
|
||||
databaseLevelThroughput: addDatabasePaneStartMessage.database.shared
|
||||
};
|
||||
|
||||
if (this.isAutoPilotSelected()) {
|
||||
createDatabaseParams.autoPilotMaxThroughput = this.maxAutoPilotThroughputSet();
|
||||
} else {
|
||||
createDatabaseParams.offerThroughput = addDatabasePaneStartMessage.offerThroughput;
|
||||
}
|
||||
|
||||
createDatabase(createDatabaseParams).then(
|
||||
(database: DataModels.Database) => {
|
||||
this._onCreateDatabaseSuccess(offerThroughput, startKey);
|
||||
|
@ -93,6 +93,10 @@ async function getOperationStatus(operationStatusUrl: string) {
|
||||
throw new AbortError(error);
|
||||
}
|
||||
|
||||
if (response.status === 204) {
|
||||
return;
|
||||
}
|
||||
|
||||
const body = await response.json();
|
||||
const status = body.status;
|
||||
if (!status && response.status === 200) {
|
||||
|
Loading…
Reference in New Issue
Block a user