<?php
date_default_timezone_set("America/Asuncion");

$app = new \Slim\App([
    'settings' => [
        'displayErrorDetails' => true
    ]
]);

$app->add(AutorizacionController::class);

$app->add(function($request, $response, $next) {
    $response = $next($request, $response);
    return $response->withHeader('Content-Type', 'application/json');
});

$app->group($basePath, function () use ($app) {
    foreach (glob(__DIR__."/Routes/*.php") as $filename)
    {
        require $filename;
    }
});

$app->run();