File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ function Invoke-ExecAppInsightsQuery {
1111 $TriggerMetadata
1212 )
1313
14- $Query = $Request.Body.query
14+ $Query = $Request.Body.query ?? $Request .Query.query
1515 if (-not $Query ) {
1616 return [HttpResponseContext ]@ {
1717 StatusCode = [HttpStatusCode ]::BadRequest
@@ -22,17 +22,17 @@ function Invoke-ExecAppInsightsQuery {
2222 }
2323
2424 try {
25- $LogData = Get-ApplicationInsightsQuery - Query $Query
25+ $LogData = Get-ApplicationInsightsQuery - Query $Query
2626
27- return [HttpResponseContext ]@ {
28- StatusCode = [HttpStatusCode ]::OK
29- Body = @ {
30- Results = @ ($LogData )
31- }
32- Metadata = @ {
33- Query = $Query
27+ return [HttpResponseContext ]@ {
28+ StatusCode = [HttpStatusCode ]::OK
29+ Body = @ {
30+ Results = @ ($LogData )
31+ }
32+ Metadata = @ {
33+ Query = $Query
34+ }
3435 }
35- }
3636
3737 } catch {
3838 return [HttpResponseContext ]@ {
You can’t perform that action at this time.
0 commit comments