251211:1314 Frontend: reeactor Admin panel
Some checks failed
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled

This commit is contained in:
admin
2025-12-11 13:14:15 +07:00
parent c8a0f281ef
commit 3fa28bd14f
79 changed files with 6571 additions and 206 deletions

View File

@@ -244,16 +244,16 @@ export class AuthService {
const now = new Date();
// Filter expired tokens in memory if query builder is complex, or rely on where clause if possible.
// Since we want to return mapped data:
// Filter expired tokens
return activeTokens
.filter((t) => t.expiresAt > now)
.filter((t) => new Date(t.expiresAt) > now)
.map((t) => ({
id: t.tokenId.toString(),
userId: t.userId,
user: {
username: t.user?.username || 'Unknown',
first_name: t.user?.firstName || '',
last_name: t.user?.lastName || '',
firstName: t.user?.firstName || '',
lastName: t.user?.lastName || '',
},
deviceName: 'Unknown Device', // Not stored in DB
ipAddress: 'Unknown IP', // Not stored in DB