Cartolas
This commit is contained in:
25
app/src/Controller/API/Informes.php
Normal file
25
app/src/Controller/API/Informes.php
Normal 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user