diff --git a/BE/src/postings/postings.service.ts b/BE/src/postings/postings.service.ts index 0ab05dc..577c2fa 100644 --- a/BE/src/postings/postings.service.ts +++ b/BE/src/postings/postings.service.ts @@ -205,6 +205,7 @@ export class PostingsService { thumbnail: posting.p_thumbnail ? await this.storageService.getImageUrl(posting.p_thumbnail) : null, + thumbnailPath: posting.p_thumbnail, period: posting.p_period, headcount: posting.p_headcount, budget: posting.p_budget, @@ -219,6 +220,7 @@ export class PostingsService { avatar: posting.u_avatar ? await this.storageService.getImageUrl(posting.u_avatar) : null, + avatarPath: posting.u_avatar, }, likeds: posting.likeds, reports: posting.reports, diff --git a/BE/src/timelines/timelines.service.ts b/BE/src/timelines/timelines.service.ts index 5f0a99b..953264e 100644 --- a/BE/src/timelines/timelines.service.ts +++ b/BE/src/timelines/timelines.service.ts @@ -68,6 +68,7 @@ export class TimelinesService { return { ...timeline, image: imageUrl, + imagePath: timeline.image, }; }) ); @@ -75,12 +76,13 @@ export class TimelinesService { async findOneWithURL(id: string) { const timeline = await this.findOne(id); + const imagePath = timeline.image; - if (timeline.image) { - timeline.image = await this.storageService.getImageUrl(timeline.image); + if (imagePath) { + timeline.image = await this.storageService.getImageUrl(imagePath); } - return timeline; + return { ...timeline, imagePath }; } @Transactional()