From 1cab3456f8e3eed3d88a34e6b4b1e9023030ec02 Mon Sep 17 00:00:00 2001 From: XYShaoKang <38753204+XYShaoKang@users.noreply.github.com> Date: Sat, 4 Nov 2023 12:40:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(background):=20=E6=9B=B4=E6=96=B0=20lccn.lb?= =?UTF-8?q?ao.site=20=E7=9A=84=20api=20=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/background/utils/lbaoAPI.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/background/utils/lbaoAPI.ts b/src/background/utils/lbaoAPI.ts index b3b6e64..6b50ef5 100644 --- a/src/background/utils/lbaoAPI.ts +++ b/src/background/utils/lbaoAPI.ts @@ -13,14 +13,17 @@ export const lbaoPredictorApi = async ( users: { data_region: string; username: string }[], retry = 5 ): Promise => { - const res = await fetch('https://lccn.lbao.site/predict_records', { - method: 'POST', - body: JSON.stringify({ - contest_name, - users, - }), - headers: { 'content-type': 'application/json' }, - }) + const res = await fetch( + 'https://lccn.lbao.site/api/v1/contest-records/predicted-rating', + { + method: 'POST', + body: JSON.stringify({ + contest_name, + users, + }), + headers: { 'content-type': 'application/json' }, + } + ) if (retry && res.status === 503) { await sleep(2000) return lbaoPredictorApi(contest_name, users, retry - 1)