summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest/ogagent.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2016-05-19 08:32:26 +0000
committerramon <ramongomez@us.es>2016-05-19 08:32:26 +0000
commit29bc749fb23396e477a3e44918a50dbd40b98e79 (patch)
tree0415ddad08040331cb6d7d451c73236d69181bc2 /admin/WebConsole/rest/ogagent.php
parent49ebd87e72a58d08ed34329b199ca1a38f5e863f (diff)
#708: Eliminar parámetro {{{error}}} en las respuestas JSON por ser redundante (el código HTTP de la respuesta indica si se produce o no un error).
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4937 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest/ogagent.php')
-rw-r--r--admin/WebConsole/rest/ogagent.php8
1 files changed, 0 insertions, 8 deletions
diff --git a/admin/WebConsole/rest/ogagent.php b/admin/WebConsole/rest/ogagent.php
index 5fc22e74..3358bdb4 100644
--- a/admin/WebConsole/rest/ogagent.php
+++ b/admin/WebConsole/rest/ogagent.php
@@ -22,11 +22,9 @@ $app->post('/ogagent/started',
// Default processing: log activity.
file_put_contents(LOG_FILE, date(DATE_RSS).": OGAgent started: ip=$ip, mac=$mac.\n", FILE_APPEND);
// Response.
- $response["error"] = false;
jsonResponse(200, $response);
} catch (Exception $e) {
// Comunication error.
- $response["error"] = true;
$response["message"] = $e->getMessage();
jsonResponse(400, $response);
}
@@ -46,11 +44,9 @@ $app->post('/ogagent/stopped',
// Default processing: log activity.
file_put_contents(LOG_FILE, date(DATE_RSS).": OGAgent stopped: ip=$ip, mac=$mac.\n", FILE_APPEND);
// Response.
- $response["error"] = false;
jsonResponse(200, $response);
} catch (Exception $e) {
// Comunication error.
- $response["error"] = true;
$response["message"] = $e->getMessage();
jsonResponse(400, $response);
}
@@ -70,11 +66,9 @@ $app->post('/ogagent/loggedin',
// Default processing: log activity.
file_put_contents(LOG_FILE, date(DATE_RSS).": User logged in: ip=$ip, user=$user.\n", FILE_APPEND);
// Response.
- $response["error"] = false;
jsonResponse(200, $response);
} catch (Exception $e) {
// Comunication error.
- $response["error"] = true;
$response["message"] = $e->getMessage();
jsonResponse(400, $response);
}
@@ -94,11 +88,9 @@ $app->post('/ogagent/loggedout',
// Default processing: log activity.
file_put_contents(LOG_FILE, date(DATE_RSS).": User logged out: ip=$ip, user=$user.\n", FILE_APPEND);
// Response.
- $response["error"] = false;
jsonResponse(200, $response);
} catch (Exception $e) {
// Comunication error.
- $response["error"] = true;
$response["message"] = $e->getMessage();
jsonResponse(400, $response);
}