This commit is contained in:
Bastian Wagner
2024-09-08 14:21:33 +02:00
parent 2a936bb4b5
commit 71458067d8

View File

@@ -34,6 +34,7 @@ export class UserService {
systemLogins: 0,
};
if (logs.length > 1) {
const current = first;
while (current <= last) {
current.setDate(current.getDate() + 1);
@@ -42,7 +43,6 @@ export class UserService {
systemLogins: 0,
};
}
logs.forEach((l) => {
if (l.type == 'login') {
res[l.timestamp.toISOString().substring(0, 10)].logins += 1;
@@ -50,6 +50,7 @@ export class UserService {
res[l.timestamp.toISOString().substring(0, 10)].systemLogins += 1;
}
});
}
return Object.entries(res).map(([date, count]) => ({
date: new Date(date),