style: auto format
This commit is contained in:
parent
7e6db0d1d9
commit
aa1019cbb4
|
|
@ -26,23 +26,23 @@ module.exports = async (ctx) => {
|
|||
});
|
||||
|
||||
const items = response.data.data.items
|
||||
.filter(item => item.score >= score)
|
||||
.map((item) => {
|
||||
let author;
|
||||
try {
|
||||
author = item.author.display_name;
|
||||
} catch (e) {
|
||||
author = '';
|
||||
}
|
||||
.filter((item) => item.score >= score)
|
||||
.map((item) => {
|
||||
let author;
|
||||
try {
|
||||
author = item.author.display_name;
|
||||
} catch (e) {
|
||||
author = '';
|
||||
}
|
||||
|
||||
return {
|
||||
link: item.uri,
|
||||
title: item.title || item.content_text,
|
||||
description: item.content,
|
||||
pubDate: parseDate(item.display_time * 1000),
|
||||
author,
|
||||
};
|
||||
});
|
||||
return {
|
||||
link: item.uri,
|
||||
title: item.title || item.content_text,
|
||||
description: item.content,
|
||||
pubDate: parseDate(item.display_time * 1000),
|
||||
author,
|
||||
};
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${titles[category]} - 实时快讯 - 华尔街见闻`,
|
||||
|
|
|
|||
Loading…
Reference in New Issue