Fix some models properties
This commit is contained in:
parent
499c66240b
commit
e2cb322001
@ -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() {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user