Skip to content

Commit

Permalink
fix(route): 修复电鸭社区和登链社区的radar问题 (#11765)
Browse files Browse the repository at this point in the history
  • Loading branch information
running-grass authored Feb 3, 2023
1 parent 1b11608 commit 6bed7cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/v2/eleduck/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions lib/v2/eleduck/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
],
Expand Down
2 changes: 1 addition & 1 deletion lib/v2/learnblockchain/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '全部文章',
Expand Down

0 comments on commit 6bed7cb

Please sign in to comment.