fix(#188): check geo, redirect to diwan
parent
5b9130eb11
commit
9a6d3cae1b
@ -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