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;
|
break;
|
||||||
|
|
||||||
case 'PUT':
|
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'])) {
|
if (isset($_PUT['wish_id'], $_PUT['wish_status'])) {
|
||||||
/**
|
/**
|
||||||
|
@ -294,7 +294,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'DELETE':
|
case 'DELETE':
|
||||||
parse_str(file_get_contents("php://input"), $_DELETE);
|
parse_str(file_get_contents('php://input'), $_DELETE);
|
||||||
|
|
||||||
if (isset($_DELETE['wish_id'])) {
|
if (isset($_DELETE['wish_id'])) {
|
||||||
$database->query(
|
$database->query(
|
||||||
|
|
|
@ -152,7 +152,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'PUT':
|
case 'PUT':
|
||||||
parse_str(file_get_contents("php://input"), $_PUT);
|
parse_str(file_get_contents('php://input'), $_PUT);
|
||||||
|
|
||||||
$database
|
$database
|
||||||
->query(
|
->query(
|
||||||
|
@ -165,7 +165,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'DELETE':
|
case 'DELETE':
|
||||||
parse_str(file_get_contents("php://input"), $_DELETE);
|
parse_str(file_get_contents('php://input'), $_DELETE);
|
||||||
|
|
||||||
$database->query(
|
$database->query(
|
||||||
'DELETE FROM `wishlists`
|
'DELETE FROM `wishlists`
|
||||||
|
|
|
@ -61,7 +61,7 @@ class API
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
parse_str(file_get_contents("php://input"), $_INPUT);
|
parse_str(file_get_contents('php://input'), $_INPUT);
|
||||||
|
|
||||||
$request_variables = array_merge($request_variables, $_INPUT);
|
$request_variables = array_merge($request_variables, $_INPUT);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue