This commit is contained in:
KotoriK 2020-12-30 01:51:50 +08:00
parent ab16878ba3
commit 32cdd5661b
1 changed files with 4 additions and 5 deletions

View File

@ -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();