mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
fix: handle no value cases
This commit is contained in:
1 parent
277a1aec79
commit
4b2f20f384
2 files changed
+4
-4
No files matched your search
@@ -57,10 +57,10 @@ export async function sessionList() {
|
|||||||
user: user.username,
|
user: user.username,
|
||||||
quest,
|
quest,
|
||||||
status,
|
status,
|
||||||
createdAt: createdAt.toLocaleString(),
|
createdAt: createdAt?.toLocaleString(),
|
||||||
finishedAt: finishedAt?.toLocaleString(),
|
finishedAt: finishedAt?.toLocaleString(),
|
||||||
usedTime: finishedAt ? formatTime(finishedAt - createdAt) : '',
|
usedTime: finishedAt ? formatTime(finishedAt - createdAt) : '',
|
||||||
commandCount: commands.length,
|
commandCount: commands?.length,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ export async function userList() {
|
|||||||
return {
|
return {
|
||||||
username,
|
username,
|
||||||
email,
|
email,
|
||||||
createdAt: createdAt.toLocaleString(),
|
createdAt: createdAt?.toLocaleString(),
|
||||||
method: loginMethods(userData),
|
method: loginMethods(userData),
|
||||||
sessionCount: count,
|
sessionCount: count,
|
||||||
lastActivityAt: lastActivityAt.toLocaleString(),
|
lastActivityAt: lastActivityAt?.toLocaleString(),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user