Skip to content

Commit

Permalink
try fixing webhook execution in cron
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 authored and trasher committed Jan 16, 2025
1 parent 531318d commit 5186403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ private function getAPIResponse(string $path): ?array
$router->registerAuthMiddleware(new \Glpi\Api\HL\Middleware\InternalAuthMiddleware());
$path = rtrim($path, '/');
$request = new Request('GET', $path);
$response = $router->handleRequest($request);
$response = Session::callAsSystem(static fn () => $router->handleRequest($request));
if ($response->getStatusCode() === 200) {
$body = (string)$response->getBody();
try {
Expand Down

0 comments on commit 5186403

Please sign in to comment.