fix
This commit is contained in:
parent
ab16878ba3
commit
32cdd5661b
|
|
@ -9,21 +9,19 @@ function resolveRelativeTime(relativeTime) {
|
|||
|
||||
if (result[0]) {
|
||||
day = result[0];
|
||||
|
||||
}
|
||||
if (result[1]) {
|
||||
hour = result[1];
|
||||
|
||||
}
|
||||
if (result[2]) {
|
||||
min = result[2];
|
||||
}
|
||||
|
||||
return ((((day || 0) * 24) + (hour || 0)) * 60 + (min || 0)) * 60 * 1000;
|
||||
return (((day || 0) * 24 + (hour || 0)) * 60 + (min || 0)) * 60 * 1000;
|
||||
}
|
||||
module.exports = async (ctx) => {
|
||||
const { id } = ctx.params;
|
||||
const feed_url = `${BASE_URL}/article/${id ? `/index/id/${id}` : ''}`;
|
||||
const feed_url = `${BASE_URL}/article/${id ? `index/id/${id}` : ''}`;
|
||||
const resp = await got({
|
||||
method: 'get',
|
||||
url: feed_url,
|
||||
|
|
@ -43,7 +41,8 @@ module.exports = async (ctx) => {
|
|||
title,
|
||||
link,
|
||||
author,
|
||||
description, pubDate
|
||||
description,
|
||||
pubDate,
|
||||
};
|
||||
})
|
||||
.get();
|
||||
|
|
|
|||
Loading…
Reference in New Issue