fix: weibo timeline cache

This commit is contained in:
DIYgod
2019-11-04 17:51:02 +08:00
parent 6181b38837
commit 079328508d
+1 -1
View File
@@ -4,7 +4,7 @@ const config = require('@/config').value;
module.exports = async (ctx) => {
const uid = ctx.params.uid;
const feature = ctx.params.feature || 0;
const token = ctx.cache.get('weibotimelineuid' + uid);
const token = await ctx.cache.get('weibotimelineuid' + uid);
if (token) {
const response = await got.get(`https://api.weibo.com/2/statuses/home_timeline.json?access_token=${token}&count=100&feature=${feature}`);