1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

fix: Fix project user activity log's missing fields and total count

Signed-off-by: Souptik Datta <souptikdatta2001@gmail.com>
This commit is contained in:
Souptik Datta 2024-02-09 00:15:48 +05:30
parent f42a78ef9c
commit 8d7be399d3
No known key found for this signature in database
GPG key ID: BC1AFB40411BFEFB

View file

@ -615,6 +615,9 @@ App::get('/v1/users/:userId/logs')
$output[$i] = new Document([
'event' => $log['event'],
'userId' => ID::custom($log['data']['userId']),
'userEmail' => $log['data']['userEmail'] ?? null,
'userName' => $log['data']['userName'] ?? null,
'ip' => $log['ip'],
'time' => $log['time'],
'osCode' => $os['osCode'],
@ -643,7 +646,7 @@ App::get('/v1/users/:userId/logs')
}
$response->dynamic(new Document([
'total' => $audit->countLogsByUser($user->getId()),
'total' => $audit->countLogsByUser($user->getInternalId()),
'logs' => $output,
]), Response::MODEL_LOG_LIST);
});