Skip to content

Commit

Permalink
fix(route/xiaohongshu): add current time as pubDate
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoyu committed Nov 20, 2024
1 parent a41cfc7 commit 63e4c92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/routes/xiaohongshu/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Route, ViewType } from '@/types';
import cache from '@/utils/cache';
import { getUser } from './util';
import InvalidParameterError from '@/errors/types/invalid-parameter';
import { parseDate } from '@/utils/parse-date';

export const route: Route = {
path: '/user/:user_id/:category',
Expand Down Expand Up @@ -57,6 +58,7 @@ async function handler(ctx) {
description: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`,
author: noteCard.user.nickname,
upvotes: noteCard.interactInfo.likedCount,
pubDate: parseDate(new Date().toISOString()),
}))
);
const renderCollect = (collect) => {
Expand All @@ -75,6 +77,7 @@ async function handler(ctx) {
description: `<img src ="${item.cover.info_list.pop().url}"><br>${item.display_title}`,
author: item.user.nickname,
upvotes: item.interact_info.likedCount,
pubDate: parseDate(new Date().toISOString()),
}));
};

Expand Down

0 comments on commit 63e4c92

Please sign in to comment.