This commit is contained in:
Juan Pablo Vial
2023-07-24 20:41:38 -04:00
parent 6ab24c8961
commit be33305cf1
612 changed files with 11436 additions and 107 deletions

View File

@ -0,0 +1,8 @@
<?php
$files = new DirectoryIterator(__DIR__ . '/api');
foreach ($files as $file) {
if ($file->isDir()) {
continue;
}
include_once $file->getRealPath();
}

View File

@ -0,0 +1,6 @@
<?php
use App\Controller\API\Unidades;
$app->group('/unidades', function($app) {
$app->get('/no_reservadas/{id_proyecto}/{id_tipo}', [Unidades::class, 'no_reservadas']);
});

View File

@ -0,0 +1,5 @@
<?php
use App\Command;
$app->add($app->getContainer()->get(Command\Money\Lookup::class));
$app->add($app->getContainer()->get(Command\Money\Get::class));

View File

@ -0,0 +1,15 @@
<?php
use App\Controller\Auth;
$app->group('/auth', function($app) {
$app->group('/login', function($app) {
$app->get('[/]', [Auth::class, 'login']);
$app->post('[/]', [Auth::class, 'do_login']);
});
$app->get('/logout[/]', [Auth::class, 'logout']);
$app->group('/pass', function($app) {
$app->get('/check', [Auth::class, 'check_pass']);
$app->get('[/]', [Auth::class, 'change_pass']);
$app->post('[/]', [Auth::class, 'do_change_pass']);
});
});

View File

@ -0,0 +1,4 @@
<?php
use App\Controller\Home;
$app->get('[/]', Home::class);