} Database::createDB(); $db = Database::singleton(); $db->reinstallDB($defaultPop); $session = Session::singleton(); $roleIds = $app->request->params('roleIds'); $session->activateRoles($roleIds); $content = Notifications::getAll(); // Return all notifications print json_encode($content, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); }); $app->get('/admin/checks/rules/evaluate/all', function () use($app) { if (Config::get('productionEnv')) { throw new Exception("Database reinstall not allowed in production environment", 403); } foreach (Rule::getAllInvRules() as $rule) { foreach ($rule->getViolations() as $violation) { Notifications::addInvariant($violation); } } foreach (Rule::getAllSigRules() as $rule) { foreach ($rule->getViolations() as $violation) { Notifications::addSignal($violation); } } $content = Notifications::getAll(); // Return all notifications print json_encode($content, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); }); $app->get('/admin/export/all', function () use($app) { if (Config::get('productionEnv')) {