fix(eslint): updated schema.prisma and did checks on abstract-user.service.ts typing for unsafe arguments.
This commit is contained in:
parent
fd120f9017
commit
99df3f8a15
File diff suppressed because one or more lines are too long
|
|
@ -348,6 +348,8 @@ enum Modules {
|
|||
employee_management
|
||||
personal_profile
|
||||
dashboard
|
||||
ticket
|
||||
ticket_management
|
||||
chatbot
|
||||
|
||||
@@map("modules")
|
||||
|
|
|
|||
|
|
@ -14,22 +14,21 @@ export abstract class AbstractUserService {
|
|||
where: { email },
|
||||
include: {
|
||||
user_module_access: {
|
||||
omit: {
|
||||
omit: {
|
||||
id: true,
|
||||
user_id: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
});
|
||||
if (!user) {
|
||||
throw new NotFoundException(`No user with email #${email} exists`);
|
||||
}
|
||||
|
||||
let module_access: Modules[] = [];
|
||||
if (user.user_module_access !== null) module_access = toKeysFromBoolean<Modules>(user.user_module_access);
|
||||
|
||||
const clean_user = {
|
||||
let module_access: Modules[] = [];
|
||||
if (user.user_module_access !== null) module_access = toKeysFromBoolean<Modules>(user.user_module_access);
|
||||
|
||||
const clean_user = {
|
||||
first_name: user.first_name,
|
||||
last_name: user.last_name,
|
||||
email: user.email,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user