From 5fa456770f054f9312163f002e42457ad372bd25 Mon Sep 17 00:00:00 2001 From: ntimo Date: Thu, 3 Oct 2019 17:25:56 +0200 Subject: [PATCH] [API] Removed hard coded status code 200 --- data/web/json_api.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/data/web/json_api.php b/data/web/json_api.php index 64d6304b..46e65519 100644 --- a/data/web/json_api.php +++ b/data/web/json_api.php @@ -113,11 +113,9 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u 'msg' => 'Task completed' )); if ($return === false) { - http_response_code(200); echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_failure; } else { - http_response_code(200); echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_success; } } @@ -1064,11 +1062,9 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u 'msg' => 'Task completed' )); if ($return === false) { - http_response_code(200); echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_failure; } else { - http_response_code(200); echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_success; } } @@ -1181,11 +1177,9 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u 'msg' => 'Task completed' )); if ($return === false) { - http_response_code(200); echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_failure; } else { - http_response_code(200); echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_success; } }