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

@@ -73,13 +73,13 @@ export async function launchAddSqlBindingQuickpick(uri: vscode.Uri | undefined):
if (!selectedBinding) {
return;
}
propertyBag.bindingType = selectedBinding.type;
propertyBag.bindingType = selectedBinding;
TelemetryReporter.createActionEvent(TelemetryViews.SqlBindingsQuickPick, TelemetryActions.getBindingType)
.withAdditionalProperties(propertyBag).send();
// 3. ask for object name for the binding
quickPickStep = 'getObjectName';
const objectName = await azureFunctionsUtils.promptForObjectName(selectedBinding.type);
const objectName = await azureFunctionsUtils.promptForObjectName(selectedBinding);
if (!objectName) {
return;
@@ -106,7 +106,7 @@ export async function launchAddSqlBindingQuickpick(uri: vscode.Uri | undefined):
// 5. insert binding
try {
quickPickStep = 'insertBinding';
const result = await addSqlBinding(selectedBinding.type, uri.fsPath, azureFunctionName, objectName, connectionStringSettingName);
const result = await addSqlBinding(selectedBinding, uri.fsPath, azureFunctionName, objectName, connectionStringSettingName);
if (!result.success) {
void vscode.window.showErrorMessage(result.errorMessage);