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 employee_management
personal_profile personal_profile
dashboard dashboard
ticket
ticket_management
chatbot chatbot
@@map("modules") @@map("modules")

View File

@ -14,22 +14,21 @@ export abstract class AbstractUserService {
where: { email }, where: { email },
include: { include: {
user_module_access: { user_module_access: {
omit: { omit: {
id: true, id: true,
user_id: true, user_id: true,
}, },
}, },
}, },
}); });
if (!user) { if (!user) {
throw new NotFoundException(`No user with email #${email} exists`); throw new NotFoundException(`No user with email #${email} exists`);
} }
let module_access: Modules[] = []; let module_access: Modules[] = [];
if (user.user_module_access !== null) module_access = toKeysFromBoolean<Modules>(user.user_module_access); if (user.user_module_access !== null) module_access = toKeysFromBoolean<Modules>(user.user_module_access);
const clean_user = { const clean_user = {
first_name: user.first_name, first_name: user.first_name,
last_name: user.last_name, last_name: user.last_name,
email: user.email, email: user.email,