rez_core 5.0.256 → 5.0.258

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": "5.0.256",
3
+ "version": "5.0.258",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -4,21 +4,22 @@ import { ReflectionHelper } from '../../../utils/service/reflection-helper.servi
4
4
 
5
5
  @Injectable()
6
6
  export class EntityUpdateRepository {
7
- constructor(private readonly entityManager: EntityManager,
8
- private readonly reflectionHelper: ReflectionHelper,
9
- ) {
10
- }
11
-
7
+ constructor(
8
+ private readonly entityManager: EntityManager,
9
+ private readonly reflectionHelper: ReflectionHelper,
10
+ ) {}
12
11
 
13
- async updateEntityAttribute(entity, config) {
14
- const { entityType, organization_id } = entity;
12
+ async updateEntityAttribute(entity, config, user) {
13
+ const { entity_type } = entity;
14
+ const { organization_id } = user;
15
15
 
16
16
  // 1. Get the table name
17
- const entityMasterRepo = this.reflectionHelper.getRepoService('EntityMaster');
17
+ const entityMasterRepo =
18
+ this.reflectionHelper.getRepoService('EntityMaster');
18
19
 
19
20
  const result = await entityMasterRepo.findOne({
20
21
  where: {
21
- mapped_entity_type: entityType,
22
+ mapped_entity_type: entity_type,
22
23
  organization_id,
23
24
  },
24
25
  });
@@ -42,7 +43,5 @@ export class EntityUpdateRepository {
42
43
  .set({ [config.attribute_key]: config.attribute_value })
43
44
  .where(`${idColumn} = :id`, { id: entity.id })
44
45
  .execute();
45
-
46
46
  }
47
-
48
47
  }
@@ -22,7 +22,7 @@ constructor(
22
22
  }
23
23
  // console.log(entity,"---------------------------------------");
24
24
 
25
- return this.entityUpdateRepository.updateEntityAttribute(entity,config);
25
+ return this.entityUpdateRepository.updateEntityAttribute(entity,config,user);
26
26
 
27
27
 
28
28
  }