From 60ee7b31c83650c65beb49492c1249a68ab16d58 Mon Sep 17 00:00:00 2001 From: humano Date: Mon, 15 Oct 2018 14:14:18 -0500 Subject: [PATCH] mejoras en api rest --- rest/index.php | 1 + rest/src/index.php | 1 + rest/src/rutas/aplicaciones.php | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 rest/index.php create mode 100644 rest/src/index.php diff --git a/rest/index.php b/rest/index.php new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/rest/index.php @@ -0,0 +1 @@ + diff --git a/rest/src/index.php b/rest/src/index.php new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/rest/src/index.php @@ -0,0 +1 @@ + diff --git a/rest/src/rutas/aplicaciones.php b/rest/src/rutas/aplicaciones.php index c9d9a54..56e875c 100644 --- a/rest/src/rutas/aplicaciones.php +++ b/rest/src/rutas/aplicaciones.php @@ -10,7 +10,7 @@ $app ->get('/api/proyectos', function(Request $request, Response $response){ $array = aplicaciones_listado("",'','array',''); - echo json_encode($array); + echo json_encode($array,JSON_NUMERIC_CHECK|JSON_PRETTY_PRINT); }); /// aplicaciones por proyecto @@ -18,7 +18,7 @@ $app ->get('/api/proyectos/{id}', function(Request $request, Response $response) $id= $request->getAttribute('id'); $array = empresa_datos("$id",'array'); - echo json_encode($array); + echo json_encode($array,JSON_NUMERIC_CHECK|JSON_PRETTY_PRINT); }); @@ -29,7 +29,7 @@ $app ->get('/api/proyectos/{id}/aplicaciones', function(Request $request, Respon $id= $request->getAttribute('id'); $array = aplicaciones_listado("$id",'','array',''); - echo json_encode($array); + echo json_encode($array,JSON_NUMERIC_CHECK|JSON_PRETTY_PRINT); });