mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 11:30:13 +08:00
Feat: User Session History
This commit is contained in:
1 parent
dc972173a4
commit
a71411d5bf
9 files changed
+92
-19
No files matched your search
@@ -44,7 +44,6 @@ export async function sessionList(pagination: Pagination): Promise<any[]> {
|
||||
commands,
|
||||
lastActivityAt,
|
||||
} = session
|
||||
console.log(finishedAt)
|
||||
return {
|
||||
_id,
|
||||
user: user.username, // Assuming `user` is always populated.
|
||||
@@ -93,8 +92,8 @@ export async function sessionDetail(id: string): Promise<any> {
|
||||
user: user.username,
|
||||
quest,
|
||||
status,
|
||||
createdAt: createdAt.toLocaleString(),
|
||||
finishedAt: finishedAt.toLocaleString(),
|
||||
createdAt: createdAt?.toLocaleString(),
|
||||
finishedAt: finishedAt?.toLocaleString(),
|
||||
usedTime: finishedAt
|
||||
? formatTime(finishedAt.getTime() - createdAt.getTime())
|
||||
: '',
|
||||
|
||||
Reference in new issue
Block a user