Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(api): fix call to api on fresh install (#11536) (#11537)
Browse files Browse the repository at this point in the history
Refs: MON-12296
  • Loading branch information
kduret authored and chgautier committed Sep 5, 2022
1 parent fe86ab8 commit c39192e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/EventSubscriber/UpdateEventSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ public static function getSubscribedEvents(): array
*/
public function validateCentreonWebVersionOrFail(RequestEvent $event): void
{
$this->debug('Checking if database configuration file exists to know if centreon is already installed');
if (! file_exists(_CENTREON_ETC_ . DIRECTORY_SEPARATOR . 'centreon.conf.php')) {
$this->debug('Centreon database configuration file not found');
return;
}

$this->debug('Checking if route matches updates endpoint');
if (
$event->getRequest()->getMethod() === Request::METHOD_PATCH
Expand Down

0 comments on commit c39192e

Please sign in to comment.