fix hexo next

This commit is contained in:
DIYgod 2018-07-29 21:07:12 +08:00
parent a0475c1746
commit 9776151402
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ module.exports = async (ctx) => {
link: encodeURI(`${url}${storyLink}`),
};
const key = item.link;
const value = ctx.cache.get(key);
const value = await ctx.cache.get(key);
if (value) {
item.description = value;
@ -39,7 +39,7 @@ module.exports = async (ctx) => {
const $ = cheerio.load(data);
item.pubDate = $('time').attr('datetime');
item.description = $('.post-body').html();
ctx.cache.set(key, item.descriptio, 6 * 60 * 60);
ctx.cache.set(key, item.description, 6 * 60 * 60);
}
return Promise.resolve(item);
})