Return BindingType directly from promptForBindingType (#19200)

* Return BindingType directly from promptForBindingType

* align

* Fix tests

* fix compile
This commit is contained in:
Charles Gagnon
2022-04-25 14:07:03 -07:00
committed by GitHub
parent 72a43854f8
commit d54b7b9970
6 changed files with 16 additions and 15 deletions

View File

@@ -40,7 +40,7 @@ export async function createAzureFunction(node?: ITreeNodeInfo): Promise<void> {
if (!selectedBinding) {
return;
}
selectedBindingType = selectedBinding.type;
selectedBindingType = selectedBinding;
propertyBag.bindingType = selectedBindingType;
TelemetryReporter.createActionEvent(TelemetryViews.CreateAzureFunctionWithSqlBinding, TelemetryActions.startCreateAzureFunctionWithSqlBinding)
.withAdditionalProperties(propertyBag).send();
@@ -71,7 +71,7 @@ export async function createAzureFunction(node?: ITreeNodeInfo): Promise<void> {
connectionInfo.database = selectedDatabase;
// prompt user for object name to create function from
objectName = await azureFunctionsUtils.promptForObjectName(selectedBinding.type);
objectName = await azureFunctionsUtils.promptForObjectName(selectedBinding);
if (!objectName) {
// user cancelled
return;
@@ -106,8 +106,8 @@ export async function createAzureFunction(node?: ITreeNodeInfo): Promise<void> {
// User cancelled
return;
}
selectedBindingType = selectedBinding.type;
propertyBag.bindingType = selectedBinding.type;
selectedBindingType = selectedBinding;
propertyBag.bindingType = selectedBinding;
TelemetryReporter.createActionEvent(TelemetryViews.CreateAzureFunctionWithSqlBinding, TelemetryActions.startCreateAzureFunctionWithSqlBinding)
.withAdditionalProperties(propertyBag).withConnectionInfo(connectionInfo).send();