-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-config.mjs
21 lines (18 loc) · 924 Bytes
/
api-config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// API Version and Base URL
export const API_VERSION = `v1`;
export const API_BASE_URL = `http://localhost:8082/api/${API_VERSION}`;
/* User Endpoints */
export const API_USERS = `${API_BASE_URL}/users`;
export const API_LOGIN = `${API_USERS}/login`;
export const API_REGISTER = `${API_USERS}`;
export const API_PROFILE = `${API_USERS}/profile`;
export const API_USER_PROFILE = (userId) => `${API_USERS}/${userId}`;
export const API_UPDATE_PASSWORD = (userId) => `${API_USERS}/${userId}/password`;
/* Inventory Endpoints */
export const API_INVENTORIES = `${API_BASE_URL}/inventories`;
export const API_USER_INVENTORIES = `${API_USERS}/inventories`;
export const API_INVENTORIES_STATS = `${API_INVENTORIES}/statistics`;
/* Product Endpoints */
export const API_PRODUCTS = `${API_BASE_URL}/products`;
export const API_USER_PRODUCTS = `${API_USERS}/products`;
export const API_PRODUCTS_STATS = `${API_PRODUCTS}/statistics`;