fix(eslint): updated schema.prisma and did checks on abstract-user.service.ts typing for unsafe arguments.

This commit is contained in:
Matthieu Haineault 2026-03-16 10:46:18 -04:00
parent fd120f9017
commit 99df3f8a15
3 changed files with 8 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -348,6 +348,8 @@ enum Modules {
employee_management
personal_profile
dashboard
ticket
ticket_management
chatbot
@@map("modules")

View File

@ -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,