diff --git a/src/requests/getCountryCode.tsx b/src/requests/getCountryCode.tsx new file mode 100644 index 00000000..99e67e84 --- /dev/null +++ b/src/requests/getCountryCode.tsx @@ -0,0 +1,19 @@ +import { AUTH_SERVICE } from 'config' +import { callApi, readToken } from 'helpers' + +export type CountryCodeType = { + country_code?: string, + error?: string, + ok: boolean, +} + +export const getCountryCode = async (): Promise => { + const config = { + method: 'GET', + } + + return callApi({ + config, + url: `${AUTH_SERVICE}/country?refresh_token=${readToken()}`, + }) +}