API 1.0.0
This commit is contained in:
@ -2,5 +2,6 @@
|
||||
use ProVM\Money\Common\Controller\API;
|
||||
|
||||
include_once 'currencies.php';
|
||||
include_once 'values.php';
|
||||
|
||||
$app->get('/', API::class);
|
||||
|
@ -7,5 +7,11 @@ $app->group('/currencies', function($app) {
|
||||
});
|
||||
|
||||
$app->group('/currency/{currency_id}', function($app) {
|
||||
$app->get('[/]', [Currencies::class, 'show']);
|
||||
$app->put('/edit[/]', [Currencies::class, 'edit']);
|
||||
$app->delete('/delete[/]', [Currencies::class, 'delete']);
|
||||
$app->group('/values', function($app) {
|
||||
$app->post('/add[/]', [Currencies::class, 'addValues']);
|
||||
$app->get('[/]', [Currencies::class, 'getValues']);
|
||||
});
|
||||
$app->get('[/]', [Currencies::class, 'get']);
|
||||
});
|
||||
|
18
app/resources/routes/values.php
Normal file
18
app/resources/routes/values.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
use ProVM\Money\Common\Controller\Values;
|
||||
|
||||
$app->group('/values', function($app) {
|
||||
$app->post('/add[/]', [Values::class, 'add']);
|
||||
$app->get('[/]', Values::class);
|
||||
});
|
||||
|
||||
$app->group('/value/{currency_id}/{base_id}/{date_time}', function($app) {
|
||||
$app->put('/edit[/]', [Values::class, 'edit']);
|
||||
$app->delete('/delete[/]', [Values::class, 'delete']);
|
||||
$app->get('[/]', [Values::class, 'get']);
|
||||
});
|
||||
$app->group('/value/{currency_id}/{base_id}', function($app) {
|
||||
$app->put('/edit[/]', [Values::class, 'edit']);
|
||||
$app->delete('/delete[/]', [Values::class, 'delete']);
|
||||
$app->get('[/]', [Values::class, 'get']);
|
||||
});
|
Reference in New Issue
Block a user