[CodeFactor] Apply fixes

[ci skip] [skip ci]
This commit is contained in:
codefactor-io
2021-02-17 11:47:27 +00:00
parent 5910d6fc53
commit 352379975a
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -2718,5 +2718,5 @@
target: '/eagle/changelog',
},
],
},
},
});
+1 -1
View File
@@ -3964,7 +3964,7 @@ router.get('/furaffinity/journal_comments/:id', require('./routes/furaffinity/jo
// 香港商报
router.get('/hkcd/pdf', require('./routes/hkcd/pdf'));
//Eagle
// Eagle
router.get('/eagle/changelog', require('./routes/eagle/changelog'));
module.exports = router;
+6 -6
View File
@@ -28,19 +28,19 @@ module.exports = async (ctx) => {
// 源说明
description: `Eagle 更新日志`,
//遍历此前获取的数据
// 遍历此前获取的数据
item:
list &&
list.map((index, item) => {
item = $(item);
// 对获取的日期进行格式化处理
function getDate() {
var str = item.find('.date').text();
var patt = /[0-9]\d*/g;
var result;
const str = item.find('.date').text();
const patt = /[0-9]\d*/g;
let result;
let date = "";
while ((result = patt.exec(str)) != null) {
date += result + '-'
date += result + '-';
}
return date.replace(/\-$/g, "");
}
@@ -53,5 +53,5 @@ module.exports = async (ctx) => {
};
})
.get(),
}
};
};