fix: AuditService::log() requires 3 args (action, entityType, entityId)

This commit is contained in:
2026-06-09 17:40:22 -04:00
parent ddec27ca5c
commit d1c36d4642

View File

@@ -226,7 +226,7 @@ class AdminController
$db->update('app_config', ['value' => $_POST[$field]], '`key` = ?', [$field]);
}
}
$this->auditService->log('app_version_updated', 'App version config updated');
$this->auditService->log('app_version_updated', 'config', null, ['details' => 'App version config updated']);
Session::setFlash('success', 'App version updated successfully.');
$this->view->redirect('/admin/app-version');
return;
@@ -284,7 +284,7 @@ class AdminController
'type' => $type,
]);
$this->auditService->log('notification_sent', "Notification: {$title}" . ($userId ? " to user #{$userId}" : ' (all users)'));
$this->auditService->log('notification_sent', 'notification', null, ['title' => $title, 'target' => $userId ? "user #{$userId}" : 'all users']);
$this->view->json(['success' => true, 'message' => 'Notification sent successfully.']);
}