mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-02 18:18:06 +08:00
fix(route): 修复电鸭社区和登链社区的radar问题 (#11765)
This commit is contained in:
@@ -17,7 +17,7 @@ const getCateName = async (ctx, cid = 0) => {
|
|||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const cid = ctx.params.id || 0;
|
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;
|
const { posts } = response.data;
|
||||||
if (posts === undefined) {
|
if (posts === undefined) {
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ module.exports = {
|
|||||||
title: '分类文章',
|
title: '分类文章',
|
||||||
docs: 'https://docs.rsshub.app/bbs.html#dian-ya-she-qu-fen-lei-wen-zhang',
|
docs: 'https://docs.rsshub.app/bbs.html#dian-ya-she-qu-fen-lei-wen-zhang',
|
||||||
source: '/categories/:cid',
|
source: '/categories/:cid',
|
||||||
target: (params) => `/eleduck/posts${params.cid}`,
|
target: (params) => `/eleduck/posts/${params.cid}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '全部文章',
|
title: '全部文章',
|
||||||
docs: 'https://docs.rsshub.app/bbs.html#dian-ya-she-qu-fen-lei-wen-zhang',
|
docs: 'https://docs.rsshub.app/bbs.html#dian-ya-she-qu-fen-lei-wen-zhang',
|
||||||
source: '*',
|
source: ['/', '*'],
|
||||||
target: () => '/eleduck/posts',
|
target: () => '/eleduck/posts',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ module.exports = {
|
|||||||
title: '分类文章',
|
title: '分类文章',
|
||||||
docs: 'https://docs.rsshub.app/programming.html#deng-lian-she-qu-wen-zhang',
|
docs: 'https://docs.rsshub.app/programming.html#deng-lian-she-qu-wen-zhang',
|
||||||
source: '/categories/:cid/:sort?',
|
source: '/categories/:cid/:sort?',
|
||||||
target: (params) => `/learnblockchain/posts/${params.cid}/${params.sort}`,
|
target: (params) => `/learnblockchain/posts/${params.cid || 'all'}/${params.sort || 'featured'}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '全部文章',
|
title: '全部文章',
|
||||||
|
|||||||
Reference in New Issue
Block a user