Skip to content

Commit 804bd5f

Browse files
committed
SInce now we are using only Invoke-FabricRestMethod, which handles messages
1 parent 90012f0 commit 804bd5f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

source/Public/Warehouse/Remove-FabricWarehouse.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@ function Remove-FabricWarehouse
4444
if ($PSCmdlet.ShouldProcess($apiEndpointURI, "Delete Warehouse"))
4545
{
4646
# Step 3: Make the API request and Validate the response
47-
$response = Invoke-FabricRestMethod -Uri $apiEndpointURI -Method Delete
48-
$response = Test-FabricApiResponse -response $response -ObjectIdOrName $WarehouseId -typeName "Warehouse"
47+
$apiParameters = @{
48+
Uri = $apiEndpointURI
49+
Method = 'DELETE'
50+
HandleResponse = $true
51+
TypeName = "Warehouse"
52+
ObjectIdOrName = $WarehouseId
53+
}
54+
$response = Invoke-FabricRestMethod @apiParameters
4955
}
5056

5157
# Step 4: Handle results

0 commit comments

Comments
 (0)