From 39ee9f180964faf848d6f5e5c35215253e9f565c Mon Sep 17 00:00:00 2001 From: JYKIM317 Date: Thu, 28 Nov 2024 23:48:38 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=B0=A9=EC=86=A1=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20API=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 정적으로 생성해서 전달하는 이미지 URL의 Path를 변경하였습니다. --- applicationServer/src/live/live.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) {