From 53fd1a47c5ad6138d082b302496ac49a7eff2422 Mon Sep 17 00:00:00 2001 From: Ro Date: Sun, 25 Apr 2021 16:00:50 -0700 Subject: [PATCH] fixed minor error when updating avi in settings --- brain/controller/APIControl.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/brain/controller/APIControl.inc.php b/brain/controller/APIControl.inc.php index 60735d2..e80c6a4 100644 --- a/brain/controller/APIControl.inc.php +++ b/brain/controller/APIControl.inc.php @@ -123,7 +123,13 @@ class APIControl case "settings": $token = $request->getHeader("fipamo-access-token"); if (Session::verifyToken($token[0])) { - $result = SettingsAPI::handleSettingsTask($request, $args, $body); + if (isset($body)) { + $postBody = $body; + } else { + $postBody = null; + } + + $result = SettingsAPI::handleSettingsTask($request, $args, $postBody); } else { $result = [ "message" => "API access denied, homie",