diff --git a/.env b/.env deleted file mode 100644 index c93ea93..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -NEXT_PUBLIC_API_URL_ROOT="https://history-api.kain.id.vn" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 307b5d6..ae0aa64 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,9 @@ yarn-debug.log* yarn-error.log* # local env files -.env*.local +.env +.env.local +.env.* # vercel .vercel @@ -35,3 +37,6 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +# custom files +api.ts \ No newline at end of file diff --git a/api.ts b/api.ts deleted file mode 100644 index e9ae500..0000000 --- a/api.ts +++ /dev/null @@ -1,32 +0,0 @@ -export const API_URL_ROOT = process.env.NEXT_PUBLIC_API_URL_ROOT || ""; -export const URL_MEDIA = "https://cdn.kain.id.vn/history-app/" -export const HOME_URL = "http://localhost:3000" -export const API = { - User : { - CURRENT: `${API_URL_ROOT}/users/current`, - MEDIA: `${API_URL_ROOT}/users/current/media`, - Update: (Id: number | string) => `${API_URL_ROOT}/users/${Id}`, - CHANGE_PASSWORD: (Id: number | string) => `${API_URL_ROOT}/users/${Id}/password`, - }, - Media:{ - PRESIGNED: `${API_URL_ROOT}/media/presigned` - }, - Auth : { - LOGOUT: `${API_URL_ROOT}/auth/logout`, - SIGNUP: `${API_URL_ROOT}/auth/signup`, - SIGNIN: `${API_URL_ROOT}/auth/signin`, - CREATEOTP: `${API_URL_ROOT}/auth/token/create`, - VERIFYOTP: `${API_URL_ROOT}/auth/token/verify`, - REFRESH: `${API_URL_ROOT}/auth/refresh`, - GOOGLE_LOGIN: `${API_URL_ROOT}/auth/google/login`, - FORGOT_PASSWORD: `${API_URL_ROOT}/auth/forgot-password`, - }, - Admin:{ - GET_LIST_USERS: `${API_URL_ROOT}/users`, - CHANGE_ROLE: (Id: number | string) => `${API_URL_ROOT}/users/${Id}/role`, - DELETE_USER: (Id: number | string) => `${API_URL_ROOT}/users/${Id}`, - RESTORE_USER: (Id: number | string) => `${API_URL_ROOT}/users/${Id}/restore`, - GET_USER_MEDIA: (Id: number | string) => `${API_URL_ROOT}/users/${Id}/media`, - GET_ALL_ROLE: `${API_URL_ROOT}/roles` - } -} \ No newline at end of file