diff --git a/lib/routes/gamegrape/index.js b/lib/routes/gamegrape/index.js index 999008231..ae1fafdc8 100644 --- a/lib/routes/gamegrape/index.js +++ b/lib/routes/gamegrape/index.js @@ -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();