feat: Add real user activity tracking system
- Create UserActivitiesTable migration for tracking user activities - Create UserActivityModel for managing activity data - Replace mock data in apiGetRecentActivity with real database data - Remove all mock/fake data from the project
This commit is contained in:
1 parent
c4189cefa7
commit
10176fd47e
3 files changed
+144
-17
No files matched your search
@@ -940,23 +940,9 @@ class UserController extends BaseController
|
||||
exit;
|
||||
}
|
||||
|
||||
// Mock data for now - implement real activity tracking later
|
||||
$activities = [
|
||||
[
|
||||
'id' => 1,
|
||||
'user_id' => 1,
|
||||
'action' => 'login',
|
||||
'description' => 'Utilizador fez login',
|
||||
'created_at' => date('Y-m-d H:i:s')
|
||||
],
|
||||
[
|
||||
'id' => 2,
|
||||
'user_id' => 1,
|
||||
'action' => 'redirect_created',
|
||||
'description' => 'Criou novo redirect',
|
||||
'created_at' => date('Y-m-d H:i:s', strtotime('-1 hour'))
|
||||
]
|
||||
];
|
||||
// Get real activity data from database
|
||||
$activityModel = new \App\Modules\Users\Models\UserActivityModel();
|
||||
$activities = $activityModel->getAllRecentActivities(50);
|
||||
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode([
|
||||
|
||||
Reference in new issue
Block a user