diff --git a/api/common/Controller/Base.php b/api/common/Controller/Base.php index ea2e716..8153b7b 100644 --- a/api/common/Controller/Base.php +++ b/api/common/Controller/Base.php @@ -24,4 +24,11 @@ class Base { $key = urlencode(base64_encode($signature)); return $this->withJson($response, ['key' => $key]); } + public function info(Request $request, Response $response): Response { + ob_start(); + phpinfo(); + $data = ob_get_clean(); + $response->getBody()->write($data); + return $response; + } } diff --git a/api/resources/routes/base.php b/api/resources/routes/base.php index c818f29..2be3305 100644 --- a/api/resources/routes/base.php +++ b/api/resources/routes/base.php @@ -3,4 +3,5 @@ use Contabilidad\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);