Skip to content

Commit

Permalink
fix: fix the router order && add library radar
Browse files Browse the repository at this point in the history
  • Loading branch information
real-jiakai committed Sep 22, 2023
1 parent 1c876c2 commit 81ae381
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/v2/gxmzu/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ module.exports = async (ctx) => {
};
});

// 使用缓存
const out = await Promise.all(
list.map((item) =>
// Using cache
// 使用缓存
ctx.cache.tryGet(item.link, async () => {
// 排除非本站点的外链
if (item.link && !item.link.startsWith('https://library.gxmzu.edu.cn')) {

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High

'
https://library.gxmzu.edu.cn
' may be followed by an arbitrary host name.
Expand Down
2 changes: 1 addition & 1 deletion lib/v2/gxmzu/maintainer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
'/aitzgg': ['real-jiakai'],
'/yjszsgg': ['real-jiakai'],
'/libzxxx': ['real-jiakai'],
'/yjszsgg': ['real-jiakai'],
};
8 changes: 8 additions & 0 deletions lib/v2/gxmzu/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ module.exports = {
target: '/gxmzu/aitzgg',
},
],
library: [
{
title: '图书馆最新消息',
docs: 'https://docs.rsshub.app/routes/unversity#guang-xi-min-zu-da-xue-tu-shu-guan-zui-xin-xiao-xi',
source: ['/news/news_list.jsp', '/'],
target: '/gxmzu/libzxxx',
},
],
yjs: [
{
title: '研究生院招生公告',
Expand Down
2 changes: 1 addition & 1 deletion lib/v2/gxmzu/router.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = (router) => {
router.get('/aitzgg', require('./ai'));
router.get('/yjszsgg', require('./yjs'));
router.get('/libzxxx', require('./lib'));
router.get('/yjszsgg', require('./yjs'));
};

0 comments on commit 81ae381

Please sign in to comment.