fix(route): odaily remove newflash from post (#9233)

This commit is contained in:
Fatpandac 2022-03-02 22:29:40 +08:00 committed by GitHub
parent 116e27a2ce
commit 3d07b9f87a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 8 deletions

View File

@ -25,14 +25,16 @@ module.exports = async (ctx) => {
url: currentUrl,
});
let items = response.data.data.items.map((item) => ({
title: item.title,
author: item.user.name,
type: item.entity_type,
description: `<p>${item.summary}</p>`,
link: `${rootUrl}/${item.entity_type}/${item.entity_id}`,
pubDate: timezone(parseDate(item.published_at), +8),
}));
let items = response.data.data.items
.map((item) => ({
title: item.title,
author: item.user.name,
type: item.entity_type,
description: `<p>${item.summary}</p>`,
link: `${rootUrl}/${item.entity_type}/${item.entity_id}`,
pubDate: timezone(parseDate(item.published_at), +8),
}))
.filter((item) => item.type !== 'newsflash');
items = await Promise.all(
items.map(