fix(#169): auth api test

test-j
Rakov Roman 3 years ago
parent 682940303f
commit 0dc031de5b
  1. 8
      src/features/AuthServiceApp/config/routes.tsx

@ -1,4 +1,6 @@
import { ENV } from 'config/env'
import { ENV, isProduction } from 'config/env'
import { readSelectedApi } from 'helpers/selectedApi'
const APIS = {
preproduction: 'https://api.auth.insports.tv',
@ -6,7 +8,9 @@ const APIS = {
staging: 'https://api.auth.test.insports.tv',
}
export const API_ROOT = APIS[ENV]
const env = isProduction ? ENV : readSelectedApi() ?? ENV
export const API_ROOT = APIS[env]
export const getApiUrl = (path: string) => (
`${API_ROOT}${path}${window.location.search}`

Loading…
Cancel
Save