Fix some models properties

This commit is contained in:
Alice Gaudon 2020-06-14 11:41:44 +02:00
parent 499c66240b
commit e2cb322001
2 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,7 @@ export default class MagicLink extends Model implements AuthProof {
public getExpirationDate(): Date {
if (!this.generated_at) return new Date();
return new Date(this.generated_at?.getTime() + MagicLink.validityPeriod());
return new Date(this.generated_at.getTime() + MagicLink.validityPeriod());
}
public authorize() {

View File

@ -20,8 +20,8 @@ export default class UserEmail extends Model {
}
public user_id?: number;
public email?: string;
private main?: boolean;
public readonly email!: string;
private main!: boolean;
public created_at?: Date;
private wasSetToMain: boolean = false;