fix(#188): check geo, redirect to diwan #49
Merged
andrey.dekterev
merged 1 commits from IN-188-check-geoinfo-redirect-diwan into develop 3 years ago
@ -0,0 +1,20 @@ |
|||||||
|
import { AUTH_SERVICE } from 'config' |
||||||
|
|
||||||
|
import { callApi } from 'helpers' |
||||||
|
|
||||||
|
export type GeoInfoType = { |
||||||
|
city: string, |
||||||
|
country_code: string, |
||||||
|
time_zone: string, |
||||||
|
} |
||||||
|
|
||||||
|
export const getGeoInfo = async (): Promise<GeoInfoType> => { |
||||||
|
const config = { |
||||||
|
method: 'GET', |
||||||
|
} |
||||||
|
|
||||||
|
return callApi({ |
||||||
|
config, |
||||||
|
url: `${AUTH_SERVICE}/geoinfo`, |
||||||
|
}) |
||||||
|
} |
||||||
Loading…
Reference in new issue