mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 09:35:28 +00:00
add last user activity on profile page
This commit is contained in:
parent
9c9dc5b5a4
commit
cc6c68957c
5 changed files with 43 additions and 5 deletions
|
|
@ -360,7 +360,7 @@ class ActivityService
|
|||
return $events;
|
||||
}
|
||||
|
||||
public function findLastEvents(
|
||||
public function findLastActivities(
|
||||
array $whitelist
|
||||
): array
|
||||
{
|
||||
|
|
@ -376,6 +376,24 @@ class ActivityService
|
|||
);
|
||||
}
|
||||
|
||||
public function findLastActivitiesByUserId(
|
||||
int $userId,
|
||||
array $whitelist
|
||||
): array
|
||||
{
|
||||
return $this->entityManagerInterface
|
||||
->getRepository(Activity::class)
|
||||
->findBy(
|
||||
[
|
||||
'userId' => $userId,
|
||||
'event' => $whitelist
|
||||
],
|
||||
[
|
||||
'id' => 'DESC'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// User
|
||||
public function addEventUserAdd(
|
||||
int $userId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue