diff --git a/applicationServer/src/live/live.service.ts b/applicationServer/src/live/live.service.ts index ff137e02..f59d3e93 100644 --- a/applicationServer/src/live/live.service.ts +++ b/applicationServer/src/live/live.service.ts @@ -85,20 +85,20 @@ export class LiveService { async updateLiveData(tokenPayload, requestBody) { const member = await this.memberService.findOneMemberWithCondition({ id: tokenPayload.memberId }); if (!this.live.data.has(member.broadcast_id)) throw new HttpException('Not Found', HttpStatus.NOT_FOUND); + const memberLiveData = this.live.data.get(member.broadcast_id); if (requestBody.thumbnail) { const imageData = Buffer.from(requestBody.thumbnail, 'base64'); - uploadData(`${member.broadcast_id}/static_thumbnail.jpg`, imageData); + uploadData(`${memberLiveData.broadcastPath}/static_thumbnail.jpg`, imageData); } - const memberLiveData = this.live.data.get(member.broadcast_id); memberLiveData.title = requestBody.title; memberLiveData.contentCategory = requestBody.contentCategory; memberLiveData.moodCategory = requestBody.moodCategory; memberLiveData.tags = requestBody.tags; memberLiveData.thumbnailUrl = requestBody.thumbnail - ? `https://kr.object.ncloudstorage.com/media-storage/${member.broadcast_id}/static_thumbnail.jpg` - : `https://kr.object.ncloudstorage.com/media-storage/${member.broadcast_id}/dynamic_thumbnail.jpg`; + ? `https://kr.object.ncloudstorage.com/media-storage/${memberLiveData.broadcastPath}/static_thumbnail.jpg` + : `https://kr.object.ncloudstorage.com/media-storage/${memberLiveData.broadcastPath}/dynamic_thumbnail.jpg`; } notifyLiveDataInterval(broadcastId: string, req: Request) {