rez_core 5.0.27 → 5.0.28
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
|
@@ -6,10 +6,12 @@ import {
|
|
|
6
6
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
7
7
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
8
8
|
import { DataSource } from 'typeorm';
|
|
9
|
+
import { EntityMasterService } from '../../meta/service/entity-master.service';
|
|
9
10
|
|
|
10
11
|
@Injectable()
|
|
11
12
|
export class EntityModificationService extends EntityServiceImpl {
|
|
12
|
-
constructor(private readonly dataSource: DataSource
|
|
13
|
+
constructor(private readonly dataSource: DataSource
|
|
14
|
+
) {
|
|
13
15
|
super();
|
|
14
16
|
}
|
|
15
17
|
async logModification(modificationData: any, loggedInUser: UserData) {
|
|
@@ -23,15 +25,7 @@ export class EntityModificationService extends EntityServiceImpl {
|
|
|
23
25
|
);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
const [entityMeta] = await this.dataSource.query(
|
|
28
|
-
`
|
|
29
|
-
SELECT db_table_name
|
|
30
|
-
FROM frm_entity_master
|
|
31
|
-
WHERE mapped_entity_type = $1 AND organization_id = $2
|
|
32
|
-
`,
|
|
33
|
-
[mapped_entity_type, organization_id],
|
|
34
|
-
);
|
|
28
|
+
const entityMeta = await this.entityMasterService.getEntityData(mapped_entity_type, loggedInUser);
|
|
35
29
|
|
|
36
30
|
if (!entityMeta || !entityMeta.db_table_name) {
|
|
37
31
|
throw new NotFoundException(
|