Base API, and more solid key and check

This commit is contained in:
Juan Pablo Vial
2024-03-20 23:07:49 -03:00
parent f3a5fa2cdc
commit 444ff687fc
8 changed files with 72 additions and 6 deletions

View File

@ -1,4 +1,6 @@
<?php
use Incoviba\Controller\API\Base;
$app->group('/api', function($app) {
$folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'api']);
if (file_exists($folder)) {
@ -10,4 +12,5 @@ $app->group('/api', function($app) {
include_once $file->getRealPath();
}
}
$app->get('[/]', Base::class);
})->add($app->getContainer()->get(Incoviba\Middleware\API::class));