Update RoleService to use nativeUpdate for soft delete functionality, ensuring more efficient database operations when marking roles as deleted.
This commit is contained in:
@@ -128,7 +128,7 @@ export class RoleService {
|
||||
throw new NotFoundException('Role not found');
|
||||
}
|
||||
|
||||
await this.roleRepository.update({ id }, { deletedAt: new Date() });
|
||||
await this.roleRepository.nativeUpdate({ id }, { deletedAt: new Date() });
|
||||
return { message: 'Role deleted successfully' };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user