rez_core 3.1.194 → 3.1.196
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
|
@@ -210,15 +210,7 @@ export class StageGroupService extends EntityServiceImpl {
|
|
|
210
210
|
userId: number,
|
|
211
211
|
loggedInUser: UserData,
|
|
212
212
|
): Promise<any> {
|
|
213
|
-
|
|
214
|
-
// `SELECT eth_user_profile.name AS created_by_name,
|
|
215
|
-
// eth_user_profile.profile_image AS profile_image
|
|
216
|
-
// FROM eth_user_profile
|
|
217
|
-
// WHERE eth_user_profile.id = ?;`,
|
|
218
|
-
// [userId],
|
|
219
|
-
// );
|
|
220
|
-
|
|
221
|
-
let user: any = [];
|
|
213
|
+
let user: any = {};
|
|
222
214
|
|
|
223
215
|
try {
|
|
224
216
|
const baseUrl = this.configService.get<string>('REDIRECT_BE_URL');
|
|
@@ -230,7 +222,7 @@ export class StageGroupService extends EntityServiceImpl {
|
|
|
230
222
|
|
|
231
223
|
// Make the GET request with query parameters
|
|
232
224
|
const response = await axios.get(
|
|
233
|
-
`${baseUrl}/
|
|
225
|
+
`${baseUrl}/users/profile-image-url/${userId}?entity_type=UPR&${queryParams}`,
|
|
234
226
|
{
|
|
235
227
|
headers: {
|
|
236
228
|
'Content-Type': 'application/json',
|
|
@@ -239,27 +231,12 @@ export class StageGroupService extends EntityServiceImpl {
|
|
|
239
231
|
);
|
|
240
232
|
|
|
241
233
|
console.log('✅ Internal Entity API response:', response.data);
|
|
242
|
-
user =
|
|
234
|
+
user.created_by_name = response.data.name;
|
|
235
|
+
user.profile = response.data.profile_image;
|
|
243
236
|
} catch (error) {
|
|
244
237
|
console.error('⚠️ Internal Entity API call failed:', error.message);
|
|
245
238
|
}
|
|
246
|
-
|
|
247
|
-
if (user.length === 0) return null;
|
|
248
|
-
|
|
249
|
-
const profileImageId = user[0].profile_image;
|
|
250
|
-
let profile: any = null;
|
|
251
|
-
|
|
252
|
-
if (profileImageId) {
|
|
253
|
-
profile = await this.mediaDataService.getMediaDownloadUrl(
|
|
254
|
-
profileImageId,
|
|
255
|
-
loggedInUser,
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
return {
|
|
260
|
-
created_by_name: user[0].name,
|
|
261
|
-
profile: profile,
|
|
262
|
-
};
|
|
239
|
+
return user;
|
|
263
240
|
}
|
|
264
241
|
|
|
265
242
|
async calculateTimeSpent(
|