removed checks

This commit is contained in:
CHIEFSOFT\ameye
2025-06-13 23:09:12 -04:00
parent 5758af7483
commit bf5fdb4257
+16 -16
View File
@@ -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;