rez_core 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -0,0 +1,4 @@
1
+ import { PartialType } from '@nestjs/mapped-types';
2
+ import { CreateUserDto } from './create-user.dto';
3
+
4
+ export class UpdateUserDto extends PartialType(CreateUserDto) {}
@@ -16,6 +16,7 @@ import { UserRoleMappingService } from './user-role-mapping.service';
16
16
  import { UserRoleMapping } from '../entity/user-role-mapping.entity';
17
17
  import { plainToInstance } from 'class-transformer';
18
18
  import { EntityListService } from '../../meta/service/entity-list.service';
19
+ import {UpdateUserDto} from "../dto/update-user.dto";
19
20
 
20
21
 
21
22
 
@@ -118,7 +119,7 @@ export class UserService extends EntityServiceImpl {
118
119
  entityData: BaseEntity,
119
120
  loggedInUserData: UserData,
120
121
  ): Promise<BaseEntity> {
121
- let userDto = entityData as CreateUserDto;
122
+ let userDto = entityData as UpdateUserDto;
122
123
 
123
124
  if (userDto.password) {
124
125
  const password = EncryptUtilService.encryptGCM(
@@ -129,9 +130,7 @@ export class UserService extends EntityServiceImpl {
129
130
  userDto.password = password;
130
131
  }
131
132
 
132
- let userData = plainToInstance(UserData, userDto, {
133
- excludeExtraneousValues: true,
134
- });
133
+ let userData = plainToInstance(UserData, userDto);
135
134
  let savedData = await super.updateEntity(userData, loggedInUserData);
136
135
  if (userDto.roles) {
137
136
  let roles = userDto.roles;