Skip to content

Commit

Permalink
fix(route/mittrchina): update api (#17552)
Browse files Browse the repository at this point in the history
  • Loading branch information
EsuRt authored Nov 12, 2024
1 parent 03e881a commit 05acee4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/routes/mittrchina/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 05acee4

Please sign in to comment.