From 0bc93c945587255edcad35a07871897ab80594ab Mon Sep 17 00:00:00 2001 From: vishnu vinay Date: Thu, 26 Dec 2024 14:49:18 +0530 Subject: [PATCH] Unauthorize issue --- src/common/middleware/middleware.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/middleware/middleware.service.ts b/src/common/middleware/middleware.service.ts index b1fd49b..34167b9 100644 --- a/src/common/middleware/middleware.service.ts +++ b/src/common/middleware/middleware.service.ts @@ -356,7 +356,7 @@ export class MiddlewareServices { req.userId, req.headers['tenantid'], ); - if (rolesOfTenant.name == 'UnauthorizedException') { + if (!rolesOfTenant && rolesOfTenant.response.error == 'Unauthorized') { return reject("User doesn't have appropriate privilege"); }