apiURLS.ts 673 Bytes
Newer Older
1
const origin = typeof window !== 'undefined' ? window.location.origin : 'http://localhost:3000';
markchkhotua's avatar
markchkhotua committed
2

3
export const API_ROOT = `${origin}/proxy`;
4

5
export const LOGIN_URL = `${API_ROOT}/oauth/token`;
Maxym Borodenko's avatar
Maxym Borodenko committed
6
export const LOGOUT_URL = `${API_ROOT}/api/v1/me/logout`;
7 8 9 10
export const CHECK_TOKEN_URL = `${API_ROOT}/oauth/check_token`;
export const VERIFY_GOOGLE_TOKEN_URL = `${API_ROOT}/google/verify-token`;

export const APIv1_BASE_URL = `${API_ROOT}/api/v1`;
11
// Me API
Maxym Borodenko's avatar
Maxym Borodenko committed
12
const ME_API = `${APIv1_BASE_URL}/me`;
Maxym Borodenko's avatar
Maxym Borodenko committed
13 14
export const GET_USER_PROFILE_URL = `${ME_API}/profile`;
export const CHANGE_USER_PASSWORD_URL = `${ME_API}/password`;
Matija Obreza's avatar
Matija Obreza committed
15

16
export const REPOSITORY_DOWNLOADFILE_URL = `/proxy/uploads`;