fix login

This commit is contained in:
Bastian Wagner
2024-09-12 14:01:53 +02:00
parent abd623f2ca
commit f9b151d914
2 changed files with 6 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ import {
Repository,
CreateDateColumn,
Column,
BeforeInsert,
} from 'typeorm';
import { User } from './user.entity';
import { Injectable } from '@nestjs/common';
@@ -25,6 +26,11 @@ export class SessionKey {
@CreateDateColumn()
createdAt: Date;
@BeforeInsert()
setPWRevision() {
this.pwRevision = this.user.pwRevision;
}
}
@Injectable()

View File

@@ -81,7 +81,6 @@ export class UsersService {
const s = this.sessionRepo.create({
user,
pwRevision: user.pwRevision,
});
const session = await this.sessionRepo.save(s);
this.activityRepo.logLogin();