From 23f732fb215cf8fb64aa32c3012ae3bb64becdcf Mon Sep 17 00:00:00 2001 From: 2paperstar Date: Thu, 23 Nov 2023 00:12:48 +0900 Subject: [PATCH] feat: html to body content body when call list --- src/notice/notice.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/notice/notice.service.ts b/src/notice/notice.service.ts index 8d5f99a..a6cb588 100644 --- a/src/notice/notice.service.ts +++ b/src/notice/notice.service.ts @@ -42,6 +42,10 @@ export class NoticeService { delete notice.authorId; return { ...notice, + contents: notice.contents.map((content) => ({ + ...content, + body: htmlToText(content.body), + })), author: author.name, imageUrl: files?.[0]?.url ? `${this.s3Url}${files[0].url}` : null, title: notice.contents[0].title,