From 2c7e9f49d5a8a153107e7c311f17258dd4407e63 Mon Sep 17 00:00:00 2001 From: ntimo Date: Fri, 4 Oct 2019 09:01:31 +0200 Subject: [PATCH] [API] Added comments to defaults --- data/web/json_api.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/web/json_api.php b/data/web/json_api.php index 0753c74a..0efc0bcd 100644 --- a/data/web/json_api.php +++ b/data/web/json_api.php @@ -206,6 +206,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u case "tls-policy-map": process_add_return(tls_policy_maps('add', $attr)); break; + // return no route found if no case is matched default: http_response_code(404); echo json_encode(array( @@ -589,6 +590,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u } echo (isset($logs) && !empty($logs)) ? json_encode($logs, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) : '{}'; break; + // return no route found if no case is matched default: http_response_code(404); echo json_encode(array( @@ -1061,6 +1063,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u break; } break; + // return no route found if no case is matched default: http_response_code(404); echo json_encode(array( @@ -1183,6 +1186,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u case "rlhash": echo ratelimit('delete', null, implode($items)); break; + // return no route found if no case is matched default: http_response_code(404); echo json_encode(array( @@ -1336,6 +1340,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u process_edit_return(edit_user_account($attr)); } break; + // return no route found if no case is matched default: http_response_code(404); echo json_encode(array(