Update Cartolas
This commit is contained in:
@ -139,4 +139,18 @@ class Cartolas extends Controller
|
||||
}
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
public function update(ServerRequestInterface $request, ResponseInterface $response,
|
||||
Service\Contabilidad\Cartola $cartolaService): ResponseInterface
|
||||
{
|
||||
$output = [
|
||||
'cartolas' => []
|
||||
];
|
||||
try {
|
||||
$cuentas = $cartolaService->check();
|
||||
if (count($cuentas) > 0) {
|
||||
$output['cartolas'] = $cartolaService->update($cuentas);
|
||||
}
|
||||
} catch (EmptyResult) {}
|
||||
return $this->withJson($response, $output);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user