1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

made nextjs-ready config

This commit is contained in:
Fedor Katurov 2022-01-13 12:37:15 +07:00
parent 28b8242b4d
commit 8bac6bb2f7
8 changed files with 45 additions and 40 deletions

View file

@ -1,12 +1,12 @@
import { IComment, INode, ITag } from '~/types';
import { OAuthProvider } from '~/types/auth';
import { CONFIG } from '~/utils/config';
export const API = {
BASE: process.env.REACT_APP_API_HOST,
BASE: CONFIG.API_HOST,
USER: {
LOGIN: '/user/login',
OAUTH_WINDOW: (provider: OAuthProvider) =>
`${process.env.REACT_APP_API_HOST}oauth/${provider}/redirect`,
OAUTH_WINDOW: (provider: OAuthProvider) => `${CONFIG.API_HOST}oauth/${provider}/redirect`,
ME: '/user/',
PROFILE: (username: string) => `/user/user/${username}/profile`,
MESSAGES: (username: string) => `/user/user/${username}/messages`,