removed checks
This commit is contained in:
@@ -41,21 +41,21 @@ class BackOffice extends BaseController
|
|||||||
$id = strtok('/');
|
$id = strtok('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
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 WRB\"}";
|
// echo "{\"status\":\"Invalid endpoint url WRB\"}";
|
||||||
exit();
|
// exit();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
$methods = $endpoints[$endpoint];
|
// $methods = $endpoints[$endpoint];
|
||||||
|
//
|
||||||
if (array_search($_SERVER['REQUEST_METHOD'], $methods) === false) {
|
// if (array_search($_SERVER['REQUEST_METHOD'], $methods) === false) {
|
||||||
header('HTTP/1.1 405 Method Not Allowed');
|
// header('HTTP/1.1 405 Method Not Allowed');
|
||||||
header('Status: 405 Method Not Allowed');
|
// header('Status: 405 Method Not Allowed');
|
||||||
echo "{\"status\":\"Invalid request method\"}";
|
// echo "{\"status\":\"Invalid request method\"}";
|
||||||
exit();
|
// exit();
|
||||||
}
|
// }
|
||||||
|
|
||||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
$in = flatten(json_decode(file_get_contents('php://input'), true));
|
$in = flatten(json_decode(file_get_contents('php://input'), true));
|
||||||
@@ -74,7 +74,7 @@ class BackOffice extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
$in["pid"] = 100;
|
$in["pid"] = 100;
|
||||||
|
$out = [];
|
||||||
|
|
||||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||||
$out['internal_return'] = $ret;
|
$out['internal_return'] = $ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user