Skip to content

Commit

Permalink
fix: feeds for mp
Browse files Browse the repository at this point in the history
  • Loading branch information
cooderl committed Feb 29, 2024
1 parent 01904ee commit 82ff72b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/server/src/feeds/feeds.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class FeedsController {
@Query('limit', new DefaultValuePipe(10), ParseIntPipe) limit: number = 10,
) {
const [id, type] = feed.split('.');
this.logger.log('getFeed: ', id);
const { content, mimeType } = await this.feedsService.handleGenerateFeed({
id,
type,
Expand Down
3 changes: 2 additions & 1 deletion apps/server/src/feeds/feeds.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,12 @@ export class FeedsService {
}

const articles = await this.prismaService.article.findMany({
where: { id },
where: { mpId: id },
orderBy: { publishTime: 'desc' },
take: limit,
});

this.logger.log('handleGenerateFeed articles: ' + articles.length);
const feed = await this.renderFeed({ feedInfo, articles, type });

switch (type) {
Expand Down

0 comments on commit 82ff72b

Please sign in to comment.