fix
This commit is contained in:
@@ -5,6 +5,7 @@ include 'constants.php';
|
|||||||
include 'formarter.php';
|
include 'formarter.php';
|
||||||
|
|
||||||
$endpoints = array(
|
$endpoints = array(
|
||||||
|
'apigate' => array('POST'),
|
||||||
'createuser' => array('POST'),
|
'createuser' => array('POST'),
|
||||||
'createmobileuser' => array('POST'),
|
'createmobileuser' => array('POST'),
|
||||||
'completemobileuser' => array('POST'),
|
'completemobileuser' => array('POST'),
|
||||||
@@ -64,7 +65,7 @@ if (substr($endpoint, 0, 19) == 'gettransportrequest' || substr($endpoint, 0, 13
|
|||||||
if (!isset($endpoints[$endpoint])) {
|
if (!isset($endpoints[$endpoint])) {
|
||||||
header('HTTP/1.1 400 Bad Request');
|
header('HTTP/1.1 400 Bad Request');
|
||||||
header('Status: 400 Bad Request');
|
header('Status: 400 Bad Request');
|
||||||
echo "{\"status\":\"Invalid endpoint url\"}";
|
echo "{\"status\":\"Invalid endpoint url WRB\"}";
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,6 +89,9 @@ if ($_SERVER["REQUEST_METHOD"] == "GET") {
|
|||||||
}
|
}
|
||||||
$in["loc"] = $_SERVER["REMOTE_ADDR"];
|
$in["loc"] = $_SERVER["REMOTE_ADDR"];
|
||||||
switch ($endpoint) {
|
switch ($endpoint) {
|
||||||
|
case 'generics':
|
||||||
|
$in["action"] = WRENCHBOARD_ACCOUNT_LOGIN;
|
||||||
|
break;
|
||||||
case 'startjoblist': $in["action"] = WRENCHBOARD_START_JOBLIST;
|
case 'startjoblist': $in["action"] = WRENCHBOARD_START_JOBLIST;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user