Skip to content

Commit

Permalink
fix(MPDZBS-877): fix config.example.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasAFink committed Nov 6, 2024
1 parent 92bd6d4 commit b57e687
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions zmscitizenapi/config.example.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
<?php
define('ZMS_API_URL', function() {
$url = filter_var(getenv('ZMS_API_URL'), FILTER_SANITIZE_URL);
if ($url === false || empty($url)) {
return 'https://localhost/terminvereinbarung/api/2';
}
if (!filter_var($url, FILTER_VALIDATE_URL)) {
throw new \InvalidArgumentException('Invalid ZMS_API_URL provided');
}
return $url;
});

define('MAINTENANCE_MODE_ENABLED', function() {
$value = filter_var(getenv('MAINTENANCE_MODE_ENABLED'), FILTER_SANITIZE_STRING);
return in_array(strtolower($value), ["1", "true", "yes"], true);
});
define('ZMS_API_URL', getenv('ZMS_API_URL') ? getenv('ZMS_API_URL') : 'https://localhost/terminvereinbarung/api/2');
define('MAINTENANCE_MODE_ENABLED', in_array(strtolower(getenv('MAINTENANCE_MODE_ENABLED')), ["1", "true", "yes"]));

class App extends \BO\Zmscitizenapi\Application
{
Expand Down

0 comments on commit b57e687

Please sign in to comment.