From 5299509673eb66e2df15a0754a6e3bf4ba3371be Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Sun, 10 May 2026 16:52:29 +0100 Subject: [PATCH 1/7] chore: removed unused imports --- src/app.service.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app.service.ts b/src/app.service.ts index 407c6ed..043a2a0 100644 --- a/src/app.service.ts +++ b/src/app.service.ts @@ -1,5 +1,4 @@ import { Injectable } from '@nestjs/common'; -import { EmailService } from './email/email.service'; @Injectable() export class AppService { From 0e53c71cd393ceec944316a4cfb2c9500f00fedb Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Sun, 10 May 2026 16:59:59 +0100 Subject: [PATCH 2/7] chore: update error message --- src/user/user.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/user/user.service.ts b/src/user/user.service.ts index bdd6682..216f5ec 100644 --- a/src/user/user.service.ts +++ b/src/user/user.service.ts @@ -22,7 +22,7 @@ export class UserService { }); if (existingUser) { - throw new BadRequestException('user with this email already exists.'); + throw new BadRequestException('User with this email already exists.'); } const user = new User(); @@ -35,7 +35,7 @@ export class UserService { if (!saved) { throw new UnprocessableEntityException( - 'failed to add user. please try again.', + 'Failed to add user. Please try again.', ); } From 74f4c154045982f0bfe507c1b3abb15ce90040d3 Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Sun, 10 May 2026 17:02:15 +0100 Subject: [PATCH 3/7] chore: update error message --- src/messenger/messenger.service.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/messenger/messenger.service.ts b/src/messenger/messenger.service.ts index 9c2aa67..b92e582 100644 --- a/src/messenger/messenger.service.ts +++ b/src/messenger/messenger.service.ts @@ -37,7 +37,7 @@ export class MessengerService { if (!onlyOne) { throw new BadRequestException( - "only provide value for either 'send_at' or 'send_after', not both.", + "Only provide value for either 'send_at' or 'send_after', not both.", ); } @@ -64,7 +64,7 @@ export class MessengerService { if (!savedMessage) { throw new UnprocessableEntityException( - 'failed to create message. please try again.', + 'Failed to create message. Please try again.', ); } @@ -82,7 +82,7 @@ export class MessengerService { if (!job) { throw new UnprocessableEntityException( - 'failed to add message. please try again', + 'Failed to add message. Please try again', ); } @@ -98,7 +98,7 @@ export class MessengerService { }); if (!message) { - throw new NotFoundException('message with id not found.'); + throw new NotFoundException('Message with id not found.'); } const user = await this.userRepository.findOneBy({ @@ -106,7 +106,7 @@ export class MessengerService { }); if (!user) { - throw new NotFoundException('user not found.'); + throw new NotFoundException('User not found.'); } const recipientEmail = user.email; From 9e40b58189bc7b82219005a55272ce2847e2d9f2 Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Mon, 11 May 2026 10:53:45 +0100 Subject: [PATCH 4/7] chore: update error message --- src/auth/guards/auth.guard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/guards/auth.guard.ts b/src/auth/guards/auth.guard.ts index 837c68d..2cfe1cd 100644 --- a/src/auth/guards/auth.guard.ts +++ b/src/auth/guards/auth.guard.ts @@ -29,7 +29,7 @@ export class AuthGuard implements CanActivate { if (!bearerToken) throw new UnauthorizedException( - 'please provide Bearer token in Authorization header.', + 'Please provide Bearer token in Authorization header.', ); const token = bearerToken.split(' ')[1]; From 90f2b1bb0eefe852118d8104f36f1a2a77134044 Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Mon, 11 May 2026 10:54:26 +0100 Subject: [PATCH 5/7] chore: update error message --- src/auth/guards/auth.guard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/guards/auth.guard.ts b/src/auth/guards/auth.guard.ts index 2cfe1cd..e67d5d1 100644 --- a/src/auth/guards/auth.guard.ts +++ b/src/auth/guards/auth.guard.ts @@ -36,7 +36,7 @@ export class AuthGuard implements CanActivate { if (!token) throw new UnauthorizedException( - 'auth token not found in Authorization header.', + 'Auth token not found in Authorization header.', ); const decodedToken = decodeJwtToken( From 9f585a66556bf999626daec1e371306f2d919791 Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Mon, 11 May 2026 10:54:47 +0100 Subject: [PATCH 6/7] chore: update error message --- src/auth/guards/auth.guard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/guards/auth.guard.ts b/src/auth/guards/auth.guard.ts index e67d5d1..345b29e 100644 --- a/src/auth/guards/auth.guard.ts +++ b/src/auth/guards/auth.guard.ts @@ -46,7 +46,7 @@ export class AuthGuard implements CanActivate { if (!decodedToken) throw new UnauthorizedException( - 'invalid auth token or token has expired, please login to get new token.', + 'Invalid auth token or token has expired, please login to get new token.', ); const sessionId = decodedToken?.sessionId; From 809a64beb2ac5d86d34d2d9617834a94bdb2b856 Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Mon, 11 May 2026 10:55:08 +0100 Subject: [PATCH 7/7] chore: update error message in auth guard --- src/auth/guards/auth.guard.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auth/guards/auth.guard.ts b/src/auth/guards/auth.guard.ts index 345b29e..d247b04 100644 --- a/src/auth/guards/auth.guard.ts +++ b/src/auth/guards/auth.guard.ts @@ -44,7 +44,7 @@ export class AuthGuard implements CanActivate { this.configService.get('APP_KEY', { infer: true }), ) as any; - if (!decodedToken) + if (!decodedToken) throw new UnauthorizedException( 'Invalid auth token or token has expired, please login to get new token.', ); @@ -55,7 +55,7 @@ export class AuthGuard implements CanActivate { const authSession = await this.authSessionService.get(sessionId); if (!authSession || authSession?.authTokenVersion != authTokenVersion) { - throw new UnauthorizedException('please login again.'); + throw new UnauthorizedException('Please login again.'); } request['user'] = {