This commit is contained in:
Juan Pablo Vial
2024-03-18 13:51:57 -03:00
parent 7385225a2e
commit 7c6a397e31
8 changed files with 42 additions and 24 deletions

View File

@ -12,6 +12,16 @@ class Inmobiliarias
{
use withJson;
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, Repository\Inmobiliaria $inmobiliariaRepository): ResponseInterface
{
$output = [
'inmobiliarias' => []
];
try {
$output['inmobiliarias'] = $inmobiliariaRepository->fetchAll('razon');
} catch (EmptyResult) {}
return $this->withJson($response, $output);
}
public function cuentas(ServerRequestInterface $request, ResponseInterface $response,
Repository\Inmobiliaria $inmobiliariaRepository,
Repository\Inmobiliaria\Cuenta $cuentaRepository, int $inmobiliaria_rut): ResponseInterface