fix(route): fix ymgal article data fetching (#15783)

This commit is contained in:
SunBK201 2024-06-01 21:50:55 +08:00 committed by GitHub
parent cce3bdb4fe
commit 2a5ec73c54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ async function handler(ctx) {
await Promise.all(
Object.values(types).map(async (type) => {
const response = await got(`${host}/co/topic/list${type}`);
data.push(response.data.data);
data.push(...response.data.data);
})
);
data = data.sort((a, b) => b.publishTime - a.publishTime).slice(0, 10);