Skip to content

Commit

Permalink
feat: html to body content body when call list
Browse files Browse the repository at this point in the history
  • Loading branch information
2paperstar committed Nov 22, 2023
1 parent b028337 commit 23f732f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/notice/notice.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 23f732f

Please sign in to comment.