fix: add missing await

This commit is contained in:
yassinedorbozgithub
2024-12-07 11:59:00 +01:00
parent 62e59069dd
commit afa8364996
12 changed files with 17 additions and 17 deletions

View File

@@ -127,7 +127,7 @@ export class PasswordResetService {
* @returns The signed JWT token.
*/
async sign(dto: UserRequestResetDto) {
return this.jwtService.signAsync(dto, this.jwtSignOptions);
return await this.jwtService.signAsync(dto, this.jwtSignOptions);
}
/**
@@ -138,6 +138,6 @@ export class PasswordResetService {
* @returns The decoded payload of the token.
*/
async verify(token: string): Promise<UserRequestResetDto> {
return this.jwtService.verifyAsync(token, this.jwtSignOptions);
return await this.jwtService.verifyAsync(token, this.jwtSignOptions);
}
}

View File

@@ -50,7 +50,7 @@ export class ValidateAccountService {
* @returns A promise that resolves to the signed JWT token.
*/
async sign(dto: { email: string }) {
return this.jwtService.signAsync(dto, this.jwtSignOptions);
return await this.jwtService.signAsync(dto, this.jwtSignOptions);
}
/**
@@ -61,7 +61,7 @@ export class ValidateAccountService {
* @returns A promise that resolves to an object containing the user's email.
*/
async verify(token: string): Promise<{ email: string }> {
return this.jwtService.verifyAsync(token, this.jwtSignOptions);
return await this.jwtService.verifyAsync(token, this.jwtSignOptions);
}
/**