mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-07-26 03:25:52 +00:00
[Web] Add rspamd-stats route to API
This commit is contained in:
parent
003499200e
commit
f3c72832f2
2 changed files with 18 additions and 0 deletions
|
|
@ -707,6 +707,10 @@ 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;
|
||||
case "rspamd-stats":
|
||||
$logs = get_logs('rspamd-stats');
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue