Implemented a password reset timeout

ref #40
This commit is contained in:
2020-12-22 11:12:24 +01:00
parent 48685451be
commit 17ee682029
3 changed files with 25 additions and 2 deletions

View File

@@ -111,6 +111,15 @@ export class User extends Principal {
@IsOptional()
profilePic?: string;
/**
* The last time the user requested a password reset.
* Used to prevent spamming of the password reset route.
*/
@Column({ nullable: true, unique: true })
@IsString()
@IsOptional()
resetRequestedTimestamp?: number;
/**
* The actions performed by this user.
* For documentation purposes only, will be implemented later.