fix(route): increase genshin fetch limit (#11393)
This commit is contained in:
parent
343610998d
commit
642c7a07d3
|
|
@ -43,12 +43,13 @@ const titles = {
|
|||
module.exports = async (ctx) => {
|
||||
const location = ctx.params.location ?? 'main';
|
||||
const category = ctx.params.category ?? 'latest';
|
||||
const limit = ctx.query.limit ? Number(ctx.query.limit) : 30;
|
||||
|
||||
const is_zh_CN = location === 'main';
|
||||
|
||||
const rootUrl = is_zh_CN
|
||||
? `https://ys.mihoyo.com/content/ysCn/getContentList?pageSize=5&pageNum=1&channelId=${config[category][location]}`
|
||||
: `https://genshin.mihoyo.com/content/yuanshen/getContentList?pageSize=5&pageNum=1&channelId=${config[category][location]}`;
|
||||
? `https://ys.mihoyo.com/content/ysCn/getContentList?pageSize=${limit}&pageNum=1&channelId=${config[category][location]}`
|
||||
: `https://genshin.mihoyo.com/content/yuanshen/getContentList?pageSize=${limit}&pageNum=1&channelId=${config[category][location]}`;
|
||||
|
||||
const response = await got(rootUrl);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue