Skip to content

Commit

Permalink
move metadata change after query execution
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDuprey committed Feb 17, 2025
1 parent d078e22 commit 7f19c2a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ function Invoke-ListGraphRequest {
}

$Metadata = $GraphRequestParams
if ($Request.Headers.'x-ms-coldstart' -eq 1) {
$Metadata.ColdStart = $true
}

try {
$Results = Get-GraphRequestList @GraphRequestParams
Expand All @@ -142,6 +139,11 @@ function Invoke-ListGraphRequest {
$Results = @()
}
}

if ($Request.Headers.'x-ms-coldstart' -eq 1) {
$Metadata.ColdStart = $true
}

$GraphRequestData = [PSCustomObject]@{
Results = @($Results)
Metadata = $Metadata
Expand Down

0 comments on commit 7f19c2a

Please sign in to comment.