feat(config): add API configuration and constants
- Add API base URL and routes configuration - Add environment variables types - Add query keys for React Query - Add general variables like pageSize
This commit is contained in:
parent
2ef0ad3c1d
commit
b15c0ac5ab
|
|
@ -0,0 +1 @@
|
|||
export const pageSize = 10;
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
export const API_GATE_WAY = "http://185.208.175.150:8090";
|
||||
|
||||
export const REQUEST_TIMEOUT = 30000;
|
||||
|
||||
export const API_ROUTES = {
|
||||
ADMIN_LOGIN: "api/v1/admin/auth/login",
|
||||
|
||||
GET_DISCOUNT_DETAIL: (id: string) => `api/v1/discount-drafts/${id}`,
|
||||
GET_DRAFT_DETAIL: (id: string) => `api/v1/drafts/${id}`,
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
export const QUERY_KEYS = {
|
||||
ADMIN_LOGIN: "admin-login",
|
||||
};
|
||||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_URL: string;
|
||||
readonly VITE_APP_BASE_URL: string;
|
||||
readonly VITE_APP_BACKEND_BASE_URL: string;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
|
|
|
|||
Loading…
Reference in New Issue