rez_core 5.0.286 → 5.0.287

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.286",
3
+ "version": "5.0.287",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -85,48 +85,39 @@ export class ViewMasterService extends EntityServiceImpl {
85
85
  async getEntityData(
86
86
  entityType: string,
87
87
  id: number,
88
- loggedInUser?: UserData | null,
88
+ loggedInUserData?: UserData | null,
89
89
  ) {
90
90
  let getTheme = null as any;
91
91
 
92
- const client = this.factory.getClient('ADM');
92
+ try {
93
+ const baseUrl = this.configService.get<string>('REDIRECT_BE_URL');
93
94
 
94
- if (!client) {
95
- return null;
96
- }
97
-
98
- getTheme = await firstValueFrom(
99
- client.send('FRM.entity.getById', {
100
- entityType: 'SCH',
101
- id: loggedInUser?.level_id,
102
- loggedInUser,
103
- }),
104
- );
105
-
106
- // try {
107
- // const baseUrl = this.configService.get<string>('REDIRECT_BE_URL');
95
+ // Make the GET request with query parameters
96
+ const response = await axios.get<any>(
97
+ `${baseUrl}/school/public/theme_json/${loggedInUserData?.level_id}`,
108
98
 
109
- // // Make the GET request with query parameters
110
- // const response = await axios.get<any>(
111
- // `${baseUrl}/school/public/theme_json/${loggedInUserData?.level_id}`,
99
+ {
100
+ headers: {
101
+ 'Content-Type': 'application/json',
102
+ },
103
+ },
104
+ );
112
105
 
113
- // {
114
- // headers: {
115
- // 'Content-Type': 'application/json',
116
- // },
117
- // },
118
- // );
119
-
120
- // getTheme = response.data;
121
- // } catch (error) {
122
- // console.error('Internal Entity API call failed:', error.message);
123
- // }
106
+ getTheme = response.data;
107
+ } catch (error) {
108
+ console.error('Internal Entity API call failed:', error.message);
109
+ }
124
110
 
125
- const viewMaster = await super.getEntityData(entityType, id, loggedInUser);
111
+ const viewMaster = await super.getEntityData(
112
+ entityType,
113
+ id,
114
+ loggedInUserData,
115
+ );
126
116
 
127
117
  return {
128
118
  ...viewMaster,
129
- theme_json: getTheme && getTheme?.theme_json ? getTheme.theme_json : null,
119
+ theme_json:
120
+ getTheme && getTheme[0]?.theme_json ? getTheme[0].theme_json : null,
130
121
  };
131
122
  }
132
123