Merge branch 'main' of https://git.jakach.ch/jakach/jakach-logging
Deploy / deploy (push) Failing after 2m18s
Deploy / deploy (push) Failing after 2m18s
This commit is contained in:
+4
-4
@@ -559,8 +559,8 @@ class Router
|
|||||||
private function runRetention(): array
|
private function runRetention(): array
|
||||||
{
|
{
|
||||||
$body = json_decode(file_get_contents('php://input'), true);
|
$body = json_decode(file_get_contents('php://input'), true);
|
||||||
$logDays = (int) ($body['log_days'] ?? 30);
|
$logDays = (int) ($body['log_days'] ?? 14);
|
||||||
$alertDays = (int) ($body['alert_days'] ?? 90);
|
$alertDays = (int) ($body['alert_days'] ?? 30);
|
||||||
$result = $this->repo->purgeOldData($logDays, $alertDays);
|
$result = $this->repo->purgeOldData($logDays, $alertDays);
|
||||||
$this->repo->logAudit('retention_purge', 'system', null, json_encode($result), $this->user());
|
$this->repo->logAudit('retention_purge', 'system', null, json_encode($result), $this->user());
|
||||||
return $result;
|
return $result;
|
||||||
@@ -569,8 +569,8 @@ class Router
|
|||||||
private function getRetentionConfig(): array
|
private function getRetentionConfig(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'log_days' => (int) ($this->repo->getConfig('retention_log_days', '30')),
|
'log_days' => (int) ($this->repo->getConfig('retention_log_days', '7')),
|
||||||
'alert_days' => (int) ($this->repo->getConfig('retention_alert_days', '90')),
|
'alert_days' => (int) ($this->repo->getConfig('retention_alert_days', '14')),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user