Merge pull request 'fix: AuditService::log() requires 3 args (action, entityType, entityId)' (#24) from feat/android-app-redesign into master

Reviewed-on: #24
This commit was merged in pull request #24.
This commit is contained in:
2026-06-09 17:42:02 -04:00

View File

@@ -226,7 +226,7 @@ class AdminController
$db->update('app_config', ['value' => $_POST[$field]], '`key` = ?', [$field]); $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.'); Session::setFlash('success', 'App version updated successfully.');
$this->view->redirect('/admin/app-version'); $this->view->redirect('/admin/app-version');
return; return;
@@ -284,7 +284,7 @@ class AdminController
'type' => $type, '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.']); $this->view->json(['success' => true, 'message' => 'Notification sent successfully.']);
} }