From 2999beb5be1e7f013e812742dc439d5fbe3e5fdd Mon Sep 17 00:00:00 2001 From: Davor Date: Fri, 10 Jun 2022 16:09:07 +0200 Subject: [PATCH] add role with id 3 as 'No access' in transformation --- src/services/users/transformations.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/services/users/transformations.ts b/src/services/users/transformations.ts index e296df9..bc2bd05 100644 --- a/src/services/users/transformations.ts +++ b/src/services/users/transformations.ts @@ -6,6 +6,8 @@ const transformRoleById = (roleId: any): UserRole => { return UserRole.Admin; case 2: return UserRole.User; + case 3: + return UserRole.NoAccess; default: return UserRole.NoAccess; } @@ -17,6 +19,8 @@ const transformRoleIdByRole = (role: UserRole | null): number | null => { return 1; case UserRole.User: return 2; + case UserRole.NoAccess: + return 3; default: return null; }