From 6f0a79fbb7342c56930a13bae2e452c3ba9e4ef2 Mon Sep 17 00:00:00 2001 From: Cleber Wilson Date: Thu, 24 Oct 2024 17:26:11 -0300 Subject: [PATCH] overload adjustment --- src/integrations/minio/s3.router.ts | 4 ++-- src/middle/error.middle.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/integrations/minio/s3.router.ts b/src/integrations/minio/s3.router.ts index 93cfe6fe..cf18a75d 100644 --- a/src/integrations/minio/s3.router.ts +++ b/src/integrations/minio/s3.router.ts @@ -48,7 +48,7 @@ export function S3Router(s3Service: S3Service, ...guards: RequestHandler[]) { execute: (_, data) => s3Service.getMedia(data), }); - return res.status(HttpStatus.OK).json(response); + res.status(HttpStatus.OK).json(response); }) .get(routerPath('media/url/:id'), ...guards, async (req, res) => { req.body = req.params; @@ -58,7 +58,7 @@ export function S3Router(s3Service: S3Service, ...guards: RequestHandler[]) { execute: (_, data) => s3Service.getMediaUrl(data.id as string, data.expiry), }); - return res.status(HttpStatus.OK).json(response); + res.status(HttpStatus.OK).json(response); }); return router; diff --git a/src/middle/error.middle.ts b/src/middle/error.middle.ts index eb585688..b41ae07a 100644 --- a/src/middle/error.middle.ts +++ b/src/middle/error.middle.ts @@ -16,7 +16,7 @@ export class ErrorMiddle { public static appError(err: Error, _: Request, res: Response, __: NextFunction) { if (err) { - return res.status(err['status'] || 500).json(err); + res.status(err['status'] || 500).json(err); } } }