This commit is contained in:
2021-04-12 00:43:27 -04:00
parent fef167c46e
commit 35bcbd1979
10 changed files with 120 additions and 13 deletions

View File

@ -1,9 +1,16 @@
<?php
use ProVM\Money\Common\Controller\API;
include_once 'currencies.php';
include_once 'values.php';
include_once 'sources.php';
$files = new DirectoryIterator(implode(DIRECTORY_SEPARATOR, [
__DIR__,
'api'
]));
foreach ($files as $file) {
if ($file->isDir()) {
continue;
}
include_once $file->getRealPath();
}
$app->get('/', API::class);

View File

@ -6,7 +6,7 @@ $app->group('/sources', function($app) {
$app->get('[/]', Sources::class);
});
$app->group('/source/{currency_id}/{url}', function($app) {
$app->group('/source/{source_id}', function($app) {
$app->put('/edit[/]', [Sources::class, 'edit']);
$app->delete('/delete[/]', [Sources::class, 'delete']);
$app->get('[/]', [Sources::class, 'get']);

View File

@ -0,0 +1,4 @@
<?php
use ProVM\Money\Common\Controller\Update;
$app->get('/update', Update::class);