mirror of
https://github.com/itdoginfo/podkop.git
synced 2026-08-02 20:14:14 +03:00
refactor: reorganize all methods
This commit is contained in:
23
fe-app-podkop/src/podkop/methods/fakeip/getIpCheck.ts
Normal file
23
fe-app-podkop/src/podkop/methods/fakeip/getIpCheck.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
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,
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user