refactor: modularize road management modules
This commit is contained in:
56
src/constants/apiRoutes.ts
Normal file
56
src/constants/apiRoutes.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
export const API_ROUTES = {
|
||||
AUTH: {
|
||||
LOGIN: 'api/auth/login',
|
||||
REFRESH: 'api/auth/refresh',
|
||||
LOGOUT: 'api/auth/logout',
|
||||
ME: 'api/auth/me',
|
||||
},
|
||||
PERMISSIONS: {
|
||||
MY_PERMISSIONS: 'api/permissions/my-permissions',
|
||||
ORGANIZATION_TREE: 'api/permissions/organization-tree',
|
||||
},
|
||||
ROLES: {
|
||||
BASE: 'api/roles',
|
||||
DETAIL: (id: number) => `api/roles/${id}`,
|
||||
STATUS: (id: number) => `api/roles/${id}/status`,
|
||||
},
|
||||
USERS: {
|
||||
BASE: 'api/users',
|
||||
STATUS: (id: number) => `api/users/${id}/status`,
|
||||
},
|
||||
CLIENTS: {
|
||||
BASE: 'api/clients',
|
||||
DETAIL: (id: number) => `api/clients/${id}`,
|
||||
STATUS: (id: number) => `api/clients/${id}/status`,
|
||||
},
|
||||
PLANS: {
|
||||
BASE: 'api/superadmin/plans',
|
||||
DETAIL: (id: number) => `api/superadmin/plans/${id}`,
|
||||
STATUS: (id: number) => `api/superadmin/plans/${id}/status`,
|
||||
},
|
||||
TENANTS: {
|
||||
BASE: 'api/superadmin/tenants',
|
||||
DETAIL: (id: number) => `api/superadmin/tenants/${id}`,
|
||||
},
|
||||
PROJECTS: {
|
||||
BASE: 'biz/api/v1/projects',
|
||||
DETAIL: (id: string) => `biz/api/v1/projects/${id}`,
|
||||
},
|
||||
PACKAGES: {
|
||||
BASE: 'biz/api/v1/packages',
|
||||
DETAIL: (id: string) => `biz/api/v1/packages/${id}`,
|
||||
},
|
||||
CHAINAGES: {
|
||||
BASE: 'biz/api/v1/chainages',
|
||||
DETAIL: (id: string) => `biz/api/v1/chainages/${id}`,
|
||||
},
|
||||
DASHBOARD: {
|
||||
OVERVIEW: 'biz/api/v1/dashboard/overview',
|
||||
},
|
||||
VIDEOS: {
|
||||
LIST: '/videos',
|
||||
UPLOAD: '/upload',
|
||||
STATUS: (id: string) => `/status/${id}`,
|
||||
RESULTS: (id: string) => `/results/${id}`,
|
||||
},
|
||||
} as const;
|
||||
Reference in New Issue
Block a user