10 lines
430 B
PHP
10 lines
430 B
PHP
<?php
|
|
include 'auth.php';
|
|
header('Content-Type: application/json; charset=utf-8');
|
|
@bg_import_ransomware_realtime_events();
|
|
$alerts = bg_alerts_read(10, true);
|
|
foreach ($alerts as $a) {
|
|
// Sends once only when configured. Failures are recorded in server logs but do not break UI toast polling.
|
|
@bg_alert_email_once($a);
|
|
}
|
|
echo json_encode(['ok'=>true, 'alerts'=>$alerts], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|