fix(route): bgmlist (#12334)

This commit is contained in:
x2cf 2023-04-17 20:09:13 +08:00 committed by GitHub
parent 27ce86ccf6
commit 7c94578a34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -5,8 +5,7 @@ const { art } = require('@/utils/render');
module.exports = async (ctx) => {
const { lang } = ctx.params;
const siteLink = 'https://bgmlist.com/api/v1/bangumi/site';
const sites = await ctx.cache.tryGet(siteLink, async () => (await got(siteLink)).data);
const { data: sites } = await got('https://bgmlist.com/api/v1/bangumi/site');
const { data } = await got('https://bgmlist.com/api/v1/bangumi/onair');
ctx.state.data = {