[API] Removed hard coded status code 200

master
ntimo 2019-10-03 17:25:56 +02:00
parent 416d5a12f8
commit 5fa456770f
No known key found for this signature in database
GPG Key ID: 3AF3627FB0440D55
1 changed files with 0 additions and 6 deletions

View File

@ -113,11 +113,9 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
'msg' => 'Task completed' 'msg' => 'Task completed'
)); ));
if ($return === false) { if ($return === false) {
http_response_code(200);
echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_failure; echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_failure;
} }
else { else {
http_response_code(200);
echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_success; 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' 'msg' => 'Task completed'
)); ));
if ($return === false) { if ($return === false) {
http_response_code(200);
echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_failure; echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_failure;
} }
else { else {
http_response_code(200);
echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_success; 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' 'msg' => 'Task completed'
)); ));
if ($return === false) { if ($return === false) {
http_response_code(200);
echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_failure; echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_failure;
} }
else { else {
http_response_code(200);
echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_success; echo isset($_SESSION['return']) ? json_encode($_SESSION['return']) : $generic_success;
} }
} }