Skip to content

Commit 0caba0b

Browse files
authored
Remove-FabricWarehouse fix (#80)
* fixes #78 * update changelog * don't need to capture response
1 parent 2a7adde commit 0caba0b

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3232
- Fixed ResourceUrl for token retrieval in `Connect-FabricAccount`.
3333
- Fixed bugs in `New-FabricEventhouse` and improved ShouldProcess logic.
3434
- Fixed parameter naming and example formatting in several functions.
35+
- Fixed issue with call to `Invoke-FabricAPIRequest` from `Remove-FabricWarehouse`.
3536

3637
### Deprecated
3738

@@ -59,4 +60,3 @@ For a full list of changes and details, please see the commit history.
5960
### Security
6061

6162
- In case of vulnerabilities.
62-

source/Public/Warehouse/Remove-FabricWarehouse.ps1

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,20 @@ function Remove-FabricWarehouse
4242
Write-Message -Message "Token validation completed." -Level Debug
4343

4444
# Step 2: Construct the API URL
45-
$apiEndpointURI = "{0}/workspaces/{1}/warehouses/{2}" -f $FabricConfig.BaseUrl, $WorkspaceId, $WarehouseId
45+
$apiEndpointURI = "workspaces/{0}/warehouses/{1}" -f $WorkspaceId, $WarehouseId
4646
Write-Message -Message "API Endpoint: $apiEndpointURI" -Level Debug
4747

4848
if ($PSCmdlet.ShouldProcess($apiEndpointURI, "Delete Warehouse"))
4949
{
5050
# Step 3: Make the API request
51-
$response = Invoke-FabricAPIRequest `
52-
-Headers $FabricConfig.FabricHeaders `
53-
-BaseURI $apiEndpointURI `
54-
-method Delete `
55-
51+
$apiParams = @{
52+
Uri = $apiEndpointURI
53+
Method = 'Delete'
54+
}
55+
$null = Invoke-FabricAPIRequest @apiParams
5656
}
5757

5858
Write-Message -Message "Warehouse '$WarehouseId' deleted successfully from workspace '$WorkspaceId'." -Level Info
59-
return $response
60-
6159
}
6260
catch
6361
{

0 commit comments

Comments
 (0)