This commit is contained in:
2024-01-17 10:33:11 -03:00
parent c4f486d3fa
commit 674aba801e
27 changed files with 1210 additions and 2 deletions

View File

@ -0,0 +1,25 @@
<?php
namespace Incoviba\Controller\API;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Incoviba\Service;
class Informes
{
use withJson;
public function diario(ServerRequestInterface $request, ResponseInterface $response, Service\Informes\Diario $diarioService): ResponseInterface
{
$body = $request->getParsedBody();
$output = [
'input' => $body,
'data' => []
];
try {
$file = $request->getUploadedFiles()['file'];
$output['data'] = $diarioService->process($file);
} catch (\Error) {}
return $this->withJson($response, $output);
}
}