diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e3b2eec..304b9985 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed ResourceUrl for token retrieval in `Connect-FabricAccount`. - Fixed bugs in `New-FabricEventhouse` and improved ShouldProcess logic. - Fixed parameter naming and example formatting in several functions. +- Fixed issue with call to `Invoke-FabricAPIRequest` from `Remove-FabricWarehouse`. ### Deprecated @@ -59,4 +60,3 @@ For a full list of changes and details, please see the commit history. ### Security - In case of vulnerabilities. - diff --git a/source/Public/Warehouse/Remove-FabricWarehouse.ps1 b/source/Public/Warehouse/Remove-FabricWarehouse.ps1 index 67e7cd97..29ddc344 100644 --- a/source/Public/Warehouse/Remove-FabricWarehouse.ps1 +++ b/source/Public/Warehouse/Remove-FabricWarehouse.ps1 @@ -42,22 +42,20 @@ function Remove-FabricWarehouse Write-Message -Message "Token validation completed." -Level Debug # Step 2: Construct the API URL - $apiEndpointURI = "{0}/workspaces/{1}/warehouses/{2}" -f $FabricConfig.BaseUrl, $WorkspaceId, $WarehouseId + $apiEndpointURI = "workspaces/{0}/warehouses/{1}" -f $WorkspaceId, $WarehouseId Write-Message -Message "API Endpoint: $apiEndpointURI" -Level Debug if ($PSCmdlet.ShouldProcess($apiEndpointURI, "Delete Warehouse")) { # Step 3: Make the API request - $response = Invoke-FabricAPIRequest ` - -Headers $FabricConfig.FabricHeaders ` - -BaseURI $apiEndpointURI ` - -method Delete ` - + $apiParams = @{ + Uri = $apiEndpointURI + Method = 'Delete' + } + $null = Invoke-FabricAPIRequest @apiParams } Write-Message -Message "Warehouse '$WarehouseId' deleted successfully from workspace '$WorkspaceId'." -Level Info - return $response - } catch {