logging
This commit is contained in:
@@ -48,7 +48,6 @@ export class ActivityLogRepository extends Repository<ActivityLog> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async logLogin(): Promise<ActivityLog> {
|
async logLogin(): Promise<ActivityLog> {
|
||||||
console.log("LOGIN")
|
|
||||||
const entity = await this.getTodaysActivityLog();
|
const entity = await this.getTodaysActivityLog();
|
||||||
entity.loginCounter += 1;
|
entity.loginCounter += 1;
|
||||||
return this.save(entity);
|
return this.save(entity);
|
||||||
@@ -81,6 +80,7 @@ export class ActivityLogRepository extends Repository<ActivityLog> {
|
|||||||
|
|
||||||
if (!x) {
|
if (!x) {
|
||||||
x = this.create({ date: new Date() });
|
x = this.create({ date: new Date() });
|
||||||
|
await this.save(x);
|
||||||
}
|
}
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user