fix(route): 修复电鸭社区和登链社区的radar问题 (#11765)

This commit is contained in:
奔跑的小草
2023-02-03 14:16:04 +08:00
committed by GitHub
parent 1b1160893b
commit 6bed7cbf49
3 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ const getCateName = async (ctx, cid = 0) => {
module.exports = async (ctx) => {
const cid = ctx.params.id || 0;
const response = await got(`https://svc.eleduck.com/api/v1/posts?category=${cid}`);
const response = await got(`https://svc.eleduck.com/api/v1/posts?category=${cid}&sort=-published_at&page=1`);
const { posts } = response.data;
if (posts === undefined) {

View File

@@ -12,12 +12,12 @@ module.exports = {
title: '分类文章',
docs: 'https://docs.rsshub.app/bbs.html#dian-ya-she-qu-fen-lei-wen-zhang',
source: '/categories/:cid',
target: (params) => `/eleduck/posts${params.cid}`,
target: (params) => `/eleduck/posts/${params.cid}`,
},
{
title: '全部文章',
docs: 'https://docs.rsshub.app/bbs.html#dian-ya-she-qu-fen-lei-wen-zhang',
source: '*',
source: ['/', '*'],
target: () => '/eleduck/posts',
},
],

View File

@@ -6,7 +6,7 @@ module.exports = {
title: '分类文章',
docs: 'https://docs.rsshub.app/programming.html#deng-lian-she-qu-wen-zhang',
source: '/categories/:cid/:sort?',
target: (params) => `/learnblockchain/posts/${params.cid}/${params.sort}`,
target: (params) => `/learnblockchain/posts/${params.cid || 'all'}/${params.sort || 'featured'}`,
},
{
title: '全部文章',