fix(route/mittrchina): update api (#17552)

This commit is contained in:
EsuRt
2024-11-12 05:10:40 -08:00
committed by GitHub
parent 03e881a6fe
commit 05acee4b9e
+2 -2
View File
@@ -52,7 +52,7 @@ async function handler(ctx) {
const { type = 'index' } = ctx.req.param();
const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10;
const link = `https://apii.mittrchina.com${typeMap[type].apiPath}`;
const link = `https://apii.web.mittrchina.com${typeMap[type].apiPath}`;
const { data: response } =
type === 'breaking'
? await got.post(link, {
@@ -95,7 +95,7 @@ async function handler(ctx) {
cache.tryGet(item.link, async () => {
const {
data: { data: details },
} = await got(`https://apii.mittrchina.com/information/details?id=${item.id}`);
} = await got(`https://apii.web.mittrchina.com/information/details?id=${item.id}`);
item.description = details.content;