From 621a66a60cf3960fa4d8b0b61bccaea0a34d4d4c Mon Sep 17 00:00:00 2001 From: Innei Date: Wed, 28 Aug 2024 20:54:45 +0800 Subject: [PATCH] chore: add images on rss builder Signed-off-by: Innei --- apps/core/src/modules/aggregate/aggregate.interface.ts | 3 +++ apps/core/src/modules/aggregate/aggregate.service.ts | 2 ++ 2 files changed, 5 insertions(+) diff --git a/apps/core/src/modules/aggregate/aggregate.interface.ts b/apps/core/src/modules/aggregate/aggregate.interface.ts index 3b0b036d..6010a323 100644 --- a/apps/core/src/modules/aggregate/aggregate.interface.ts +++ b/apps/core/src/modules/aggregate/aggregate.interface.ts @@ -1,3 +1,5 @@ +import type { ImageModel } from '~/shared/model/image.model' + export interface RSSProps { title: string url: string @@ -10,5 +12,6 @@ export interface RSSProps { title: string text: string id: string + images: ImageModel[] }[] } diff --git a/apps/core/src/modules/aggregate/aggregate.service.ts b/apps/core/src/modules/aggregate/aggregate.service.ts index ce03cc56..5f1a9471 100644 --- a/apps/core/src/modules/aggregate/aggregate.service.ts +++ b/apps/core/src/modules/aggregate/aggregate.service.ts @@ -333,6 +333,7 @@ export class AggregateService { created: post.created!, modified: post.modified, link: baseURL + this.urlService.build(post), + images: post.images || [], } }) const notesRss: RSSProps['data'] = notes.map((note) => { @@ -343,6 +344,7 @@ export class AggregateService { created: note.created!, modified: note.modified, link: baseURL + this.urlService.build(note), + images: note.images || [], } })