fix: error on admin dashboard when user "last seen" is null

This commit is contained in:
Sonny
2024-10-07 02:48:32 +02:00
parent d360a9044c
commit bc376a72ee

View File

@@ -14,9 +14,10 @@ class UserWithRelationCountDto {
fullname: this.user.name,
avatarUrl: this.user.avatarUrl,
isAdmin: this.user.isAdmin,
createdAt: this.user.createdAt,
updatedAt: this.user.updatedAt,
lastSeenAt: this.user.lastSeenAt,
createdAt: this.user.createdAt.toString(),
updatedAt: this.user.updatedAt.toString(),
lastSeenAt:
this.user.lastSeenAt?.toString() ?? this.user.updatedAt.toString(),
linksCount: Number(this.user.$extras.totalLinks),
collectionsCount: Number(this.user.$extras.totalCollections),
});