Skip to content

Commit 90ae927

Browse files
committed
refactor: remove redundant not found error handling from users service and controller
1 parent 07b8a2f commit 90ae927

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

src/modules/users/controllers/users.controller.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,6 @@ export class UsersController {
383383
};
384384
}
385385

386-
@ApiNotFoundResponse({
387-
description: 'Users not found',
388-
})
389386
@ApiOkResponse({
390387
type: GetUserByTelegramIdResponseDto,
391388
description: 'Users fetched successfully',
@@ -413,9 +410,6 @@ export class UsersController {
413410
};
414411
}
415412

416-
@ApiNotFoundResponse({
417-
description: 'Users not found',
418-
})
419413
@ApiOkResponse({
420414
type: GetUserByEmailResponseDto,
421415
description: 'Users fetched successfully',
@@ -443,9 +437,6 @@ export class UsersController {
443437
};
444438
}
445439

446-
@ApiNotFoundResponse({
447-
description: 'Users not found',
448-
})
449440
@ApiOkResponse({
450441
type: GetUserByTagResponseDto,
451442
description: 'Users fetched successfully',

src/modules/users/users.service.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,6 @@ export class UsersService {
361361
tag: dto.tag || undefined,
362362
});
363363

364-
if (!result || result.length === 0) return fail(ERRORS.USERS_NOT_FOUND);
365-
366364
return ok(result);
367365
} catch (error) {
368366
this.logger.error(error);

0 commit comments

Comments
 (0)