From 35f5a76dfae2af49bad961326495d3eb48d3913d Mon Sep 17 00:00:00 2001 From: grandeljay Date: Mon, 28 Nov 2022 12:13:53 +0100 Subject: [PATCH] Fix API input/request variables --- src/api/wishes.php | 2 +- src/api/wishlists.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/wishes.php b/src/api/wishes.php index 95376f13..5b7ce905 100644 --- a/src/api/wishes.php +++ b/src/api/wishes.php @@ -259,7 +259,7 @@ switch ($_SERVER['REQUEST_METHOD']) { break; case 'PUT': - parse_str(file_get_contents('php://input'), $_PUT); + $_PUT = $this->input; if (isset($_PUT['wish_id'], $_PUT['wish_status'])) { /** diff --git a/src/api/wishlists.php b/src/api/wishlists.php index f0acf0a1..5900919f 100644 --- a/src/api/wishlists.php +++ b/src/api/wishlists.php @@ -152,7 +152,7 @@ switch ($_SERVER['REQUEST_METHOD']) { break; case 'PUT': - parse_str(file_get_contents('php://input'), $_PUT); + $_PUT = $this->input; $database ->query( @@ -165,7 +165,7 @@ switch ($_SERVER['REQUEST_METHOD']) { break; case 'DELETE': - parse_str(file_get_contents('php://input'), $_DELETE); + $_DELETE = $this->input; $database->query( 'DELETE FROM `wishlists`