backend integration started
This commit is contained in:
@@ -62,7 +62,7 @@ export const tenantsApi = {
|
||||
* endpoint rather than a tenant-scoped one.
|
||||
*/
|
||||
listAll: (query: TenantListQuery = {}) =>
|
||||
api.get<TenantInfo[]>(`${WEB}/tenants/getalltenants`, {
|
||||
api.list<TenantInfo>(`${WEB}/tenants/getalltenants`, {
|
||||
pageno: query.pageno ?? 1,
|
||||
pagesize: query.pagesize ?? 100,
|
||||
status: query.status,
|
||||
@@ -83,14 +83,14 @@ export const tenantsApi = {
|
||||
* so this list is a queue to work from, not one to act on.
|
||||
*/
|
||||
byApproval: (status: 'pending' | 'Active' | 'InActive', keyword?: string) =>
|
||||
api.get<TenantInfo[]>(`${WEB}/tenants/search`, { status, keyword }),
|
||||
api.list<TenantInfo>(`${WEB}/tenants/search`, { status, keyword }),
|
||||
|
||||
/** Branches under one tenant. `tenantid` is required — omit it and it 400s. */
|
||||
locations: (tenantid: number) =>
|
||||
api.get<TenantLocation[]>(`${WEB}/tenants/gettenantlocations`, { tenantid }),
|
||||
api.list<TenantLocation>(`${WEB}/tenants/gettenantlocations`, { tenantid }),
|
||||
|
||||
search: (keyword: string) =>
|
||||
api.get<TenantInfo[]>(`${WEB}/tenants/searchbykeyword`, { keyword }),
|
||||
api.list<TenantInfo>(`${WEB}/tenants/searchbykeyword`, { keyword }),
|
||||
|
||||
/**
|
||||
* Provisions the enterprise, its first outlet, and the primary Administrator
|
||||
@@ -187,5 +187,5 @@ export const utilsApi = {
|
||||
* form and never called this, which means a category added to the master is
|
||||
* invisible to onboarding until someone edits the frontend.
|
||||
*/
|
||||
appCategories: () => api.get<AppCategory[]>(`${WEB}/utils/getappcategories`),
|
||||
appCategories: () => api.list<AppCategory>(`${WEB}/utils/getappcategories`),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user