Make resource parameter optional for getSecurityToken API (#3322)

This commit is contained in:
Matt Irvine
2018-11-27 16:12:30 -08:00
committed by GitHub
parent 4c075df327
commit 087ed7c132
3 changed files with 9 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ import {
MainThreadAccountManagementShape,
SqlMainContext,
} from 'sql/workbench/api/node/sqlExtHost.protocol';
import { AzureResource } from 'sql/workbench/api/common/sqlExtHostTypes';
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
import { Event, Emitter } from 'vs/base/common/event';
@@ -89,7 +90,10 @@ export class ExtHostAccountManagement extends ExtHostAccountManagementShape {
return Promise.all(promises).then(() => resultAccounts);
}
public $getSecurityToken(account: sqlops.Account, resource: sqlops.AzureResource): Thenable<{}> {
public $getSecurityToken(account: sqlops.Account, resource?: sqlops.AzureResource): Thenable<{}> {
if (resource === undefined) {
resource = AzureResource.ResourceManagement;
}
return this.$getAllAccounts().then(() => {
for (const handle in this._accounts) {
const providerHandle = parseInt(handle);