diff --git a/src/app/services/server.ts b/src/app/services/server.ts index 81e45a0d..d93d6677 100644 --- a/src/app/services/server.ts +++ b/src/app/services/server.ts @@ -67,11 +67,11 @@ export const serverApi = createApi({ }), getIfInChina: builder.query({ query: () => ({ - url: `https://ipapi.co/json` + url: `https://cf-props.ihacker.dev` }), transformResponse: (resp: IPData) => { if (!("error" in resp)) { - return resp.country_code.toUpperCase() == "CN"; + return resp.country.toUpperCase() == "CN"; } return false; } diff --git a/src/types/common.ts b/src/types/common.ts index b7316348..653f2539 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -15,4 +15,4 @@ export type Price = { type: PriceType; sub_dur?: PriceSubscriptionDuration; }; -export type IPData = { error?: boolean; country: string; country_code: string }; +export type IPData = { error?: boolean; country: string };