Refactor
This commit is contained in:
parent
48a3af6ba6
commit
e3a02ca289
3 changed files with 5 additions and 5 deletions
|
@ -259,7 +259,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
|||
break;
|
||||
|
||||
case 'PUT':
|
||||
parse_str(file_get_contents("php://input"), $_PUT);
|
||||
parse_str(file_get_contents('php://input'), $_PUT);
|
||||
|
||||
if (isset($_PUT['wish_id'], $_PUT['wish_status'])) {
|
||||
/**
|
||||
|
@ -294,7 +294,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
|||
break;
|
||||
|
||||
case 'DELETE':
|
||||
parse_str(file_get_contents("php://input"), $_DELETE);
|
||||
parse_str(file_get_contents('php://input'), $_DELETE);
|
||||
|
||||
if (isset($_DELETE['wish_id'])) {
|
||||
$database->query(
|
||||
|
|
|
@ -152,7 +152,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
|||
break;
|
||||
|
||||
case 'PUT':
|
||||
parse_str(file_get_contents("php://input"), $_PUT);
|
||||
parse_str(file_get_contents('php://input'), $_PUT);
|
||||
|
||||
$database
|
||||
->query(
|
||||
|
@ -165,7 +165,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
|||
break;
|
||||
|
||||
case 'DELETE':
|
||||
parse_str(file_get_contents("php://input"), $_DELETE);
|
||||
parse_str(file_get_contents('php://input'), $_DELETE);
|
||||
|
||||
$database->query(
|
||||
'DELETE FROM `wishlists`
|
||||
|
|
|
@ -61,7 +61,7 @@ class API
|
|||
break;
|
||||
|
||||
default:
|
||||
parse_str(file_get_contents("php://input"), $_INPUT);
|
||||
parse_str(file_get_contents('php://input'), $_INPUT);
|
||||
|
||||
$request_variables = array_merge($request_variables, $_INPUT);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue