Limpieza de objetos externos
This commit is contained in:
12
api/resources/documentation/base.json
Normal file
12
api/resources/documentation/base.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Contabilidad",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"paths": {
|
||||
"/transactions": {
|
||||
"description": "List transactions"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,4 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\Base;
|
||||
use Common\Controller\Base;
|
||||
|
||||
$app->get('/key/generate[/]', [Base::class, 'generate_key']);
|
||||
$app->get('/balance[/]', [Contabilidad\Common\Controller\TiposCategorias::class, 'balance']);
|
||||
$app->get('/info', [Base::class, 'info']);
|
||||
$app->get('/', Base::class);
|
||||
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\Categorias;
|
||||
|
||||
$app->group('/categorias', function($app) {
|
||||
$app->post('/add[/]', [Categorias::class, 'add']);
|
||||
$app->get('[/]', Categorias::class);
|
||||
});
|
||||
$app->group('/categoria/{categoria_id}', function($app) {
|
||||
$app->get('/cuentas', [Categorias::class, 'cuentas']);
|
||||
$app->put('/edit', [Categorias::class, 'edit']);
|
||||
$app->delete('/delete', [Categorias::class, 'delete']);
|
||||
$app->get('[/]', [Categorias::class, 'show']);
|
||||
});
|
@ -1,7 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\Consolidados;
|
||||
|
||||
$app->group('/consolidar', function($app) {
|
||||
$app->get('/update/{mes}/{cuenta_id}', [Consolidados::class, 'update']);
|
||||
$app->get('[/]', [Consolidados::class, 'cli']);
|
||||
});
|
@ -1,20 +1,12 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\Cuentas;
|
||||
use Common\Controller\Cuentas;
|
||||
|
||||
$app->group('/cuentas', function($app) {
|
||||
$app->post('/add[/]', [Cuentas::class, 'add']);
|
||||
$app->get('[/]', Cuentas::class);
|
||||
$app->post('/add[/]', [Cuentas::class, 'add']);
|
||||
$app->post('/edit[/]', [Cuentas::class, 'edit']);
|
||||
$app->get('[/]', Cuentas::class);
|
||||
});
|
||||
$app->group('/cuenta/{cuenta_id}', function($app) {
|
||||
$app->get('/entradas', [Cuentas::class, 'entradas']);
|
||||
$app->group('/transacciones', function($app) {
|
||||
$app->get('/amount', [Cuentas::class, 'transaccionesAmount']);
|
||||
$app->get('/month/{month}', [Cuentas::class, 'transaccionesMonth']);
|
||||
$app->get('/acum/{date}', [Cuentas::class, 'transaccionesAcumulation']);
|
||||
$app->get('[/{limit:[0-9]+}[/{start:[0-9]+}]]', [Cuentas::class, 'transacciones']);
|
||||
});
|
||||
$app->get('/categoria', [Cuentas::class, 'categoria']);
|
||||
$app->put('/edit', [Cuentas::class, 'edit']);
|
||||
$app->delete('/delete', [Cuentas::class, 'delete']);
|
||||
$app->get('[/]', [Cuentas::class, 'show']);
|
||||
$app->post('/edit[/]', [Cuentas::class, 'editOne']);
|
||||
$app->get('[/]', [Cuentas::class, 'get']);
|
||||
});
|
||||
|
@ -1,5 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\Import;
|
||||
|
||||
$app->post('/import', Import::class);
|
||||
$app->get('/import/uploads', [Import::class, 'uploads']);
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\Monedas;
|
||||
|
||||
$app->group('/monedas', function($app) {
|
||||
$app->post('/add[/]', [Monedas::class, 'add']);
|
||||
$app->get('[/]', Monedas::class);
|
||||
});
|
||||
$app->group('/moneda/{moneda_id}', function($app) {
|
||||
$app->put('/edit', [Monedas::class, 'edit']);
|
||||
$app->delete('/delete', [Monedas::class, 'delete']);
|
||||
$app->get('[/]', [Monedas::class, 'show']);
|
||||
});
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\Queues;
|
||||
|
||||
$app->group('/queues', function($app) {
|
||||
$app->get('/pending', [Queues::class, 'pending']);
|
||||
$app->post('/processed', [Queues::class, 'processed']);
|
||||
$app->get('[/]', Queues::class);
|
||||
});
|
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
$folder = implode(DIRECTORY_SEPARATOR, [
|
||||
__DIR__,
|
||||
'tipos'
|
||||
]);
|
||||
if (file_exists($folder)) {
|
||||
$app->group('/tipos', function($app) use ($folder) {
|
||||
$files = new DirectoryIterator($folder);
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir() or $file->getExtension() != 'php') {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
||||
});
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\TiposCambios;
|
||||
|
||||
$app->group('/cambios', function($app) {
|
||||
$app->post('/obtener[/]', [TiposCambios::class, 'obtain']);
|
||||
$app->post('/add[/]', [TiposCambios::class, 'add']);
|
||||
$app->get('[/]', TiposCambios::class);
|
||||
});
|
||||
$app->group('/cambio/{tipo_id}', function($app) {
|
||||
$app->put('/edit[/]', [TiposCambios::class, 'edit']);
|
||||
$app->delete('/delete[/]', [TiposCambios::class, 'delete']);
|
||||
$app->get('[/]', [TiposCambios::class, 'show']);
|
||||
});
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\TiposCategorias;
|
||||
|
||||
$app->group('/categorias', function($app) {
|
||||
$app->post('/add[/]', [TiposCategorias::class, 'add']);
|
||||
$app->get('[/]', TiposCategorias::class);
|
||||
});
|
||||
$app->group('/categoria/{tipo_id}', function($app) {
|
||||
$app->get('/categorias', [TiposCategorias::class, 'categorias']);
|
||||
$app->put('/edit', [TiposCategorias::class, 'edit']);
|
||||
$app->delete('/delete', [TiposCategorias::class, 'delete']);
|
||||
$app->get('[/]', [TiposCategorias::class, 'show']);
|
||||
});
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\TiposCuentas;
|
||||
|
||||
$app->group('/cuentas', function($app) {
|
||||
$app->post('/add[/]', [TiposCuentas::class, 'add']);
|
||||
$app->get('[/]', TiposCuentas::class);
|
||||
});
|
||||
$app->group('/cuenta/{tipo_id}', function($app) {
|
||||
$app->put('/edit', [TiposCuentas::class, 'edit']);
|
||||
$app->delete('/delete', [TiposCuentas::class, 'delete']);
|
||||
$app->get('[/]', [TiposCuentas::class, 'show']);
|
||||
});
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\Transacciones;
|
||||
|
||||
$app->group('/transacciones', function($app) {
|
||||
$app->post('/add[/]', [Transacciones::class, 'add']);
|
||||
$app->get('[/]', Transacciones::class);
|
||||
});
|
||||
$app->group('/transaccion/{transaccion_id}', function($app) {
|
||||
$app->put('/edit', [Transacciones::class, 'edit']);
|
||||
$app->delete('/delete', [Transacciones::class, 'delete']);
|
||||
$app->get('[/]', [Transacciones::class, 'show']);
|
||||
});
|
@ -1,12 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\Files;
|
||||
|
||||
$app->group('/uploads', function($app) {
|
||||
$app->post('/add[/]', [Files::class, 'upload']);
|
||||
$app->get('[/]', Files::class);
|
||||
});
|
||||
$app->group('/upload/{folder}/{filename}', function($app) {
|
||||
$app->put('[/]', [Files::class, 'edit']);
|
||||
$app->delete('[/]', [Files::class, 'delete']);
|
||||
$app->get('[/]', [Files::class, 'get']);
|
||||
});
|
@ -1,6 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Controller\Workers;
|
||||
|
||||
$app->group('/workers', function($app) {
|
||||
$app->post('/register', [Workers::class, 'register']);
|
||||
});
|
Reference in New Issue
Block a user