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