mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-10 05:26:50 +03:00
24 lines
560 B
TypeScript
24 lines
560 B
TypeScript
import { IP_CHECK_DOMAIN } from '../../../constants';
|
|
import { createBaseApiRequest, IBaseApiResponse } from '../../api';
|
|
|
|
interface IGetIpCheckResponse {
|
|
fakeip: boolean;
|
|
IP: string;
|
|
}
|
|
|
|
export async function getIpCheck(): Promise<
|
|
IBaseApiResponse<IGetIpCheckResponse>
|
|
> {
|
|
return createBaseApiRequest<IGetIpCheckResponse>(
|
|
() =>
|
|
fetch(`https://${IP_CHECK_DOMAIN}/check`, {
|
|
method: 'GET',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
}),
|
|
{
|
|
operationName: 'getIpCheck',
|
|
timeoutMs: 5000,
|
|
},
|
|
);
|
|
}
|