From e112ea720e92ee64910ece9577adcd5fdea4db84 Mon Sep 17 00:00:00 2001 From: stefano-lacorazza <112132737+stefano-lacorazza@users.noreply.github.com> Date: Tue, 20 Aug 2024 08:08:29 -0500 Subject: [PATCH] OV-5: * run prettier --- .../src/common/services/token/token.services.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/src/common/services/token/token.services.ts b/backend/src/common/services/token/token.services.ts index 371bb986b..2d688f689 100644 --- a/backend/src/common/services/token/token.services.ts +++ b/backend/src/common/services/token/token.services.ts @@ -10,20 +10,20 @@ class TokenService { this.EXPIRATION_TIME = expirationTime; } -public async createToken(userId: number): Promise { + public async createToken(userId: number): Promise { return await new SignJWT({ userId }) .setProtectedHeader({ alg: 'HS256' }) .setExpirationTime(this.EXPIRATION_TIME) .sign(this.SECRET_KEY); } -public async verifyToken(token: string): Promise { - try { - const { payload } = await jwtVerify(token, this.SECRET_KEY); - return payload; - } catch { - return null; - } + public async verifyToken(token: string): Promise { + try { + const { payload } = await jwtVerify(token, this.SECRET_KEY); + return payload; + } catch { + return null; + } } }