mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
Paginated With MongoDB / Create New Endpoint
change routes /combine name, add route /api/source/paginated add new endpoint source/paginated fixing table responsive create new function to handling api/source/paginated
This commit is contained in:
@@ -2,15 +2,10 @@ import apiClient from '../client';
|
||||
import endpoints from '../endpoints';
|
||||
|
||||
const userService = {
|
||||
getDocs: (
|
||||
sort: string,
|
||||
order: string,
|
||||
pageNumber: number,
|
||||
rowsPerPage: number,
|
||||
): Promise<any> =>
|
||||
apiClient.get(
|
||||
`${endpoints.USER.DOCS}?sort=${sort}&order=${order}&page=${pageNumber}&rows=${rowsPerPage}`,
|
||||
),
|
||||
getDocs: (sort: string, order: string): Promise<any> =>
|
||||
apiClient.get(`${endpoints.USER.DOCS}?sort=${sort}&order=${order}`),
|
||||
getDocsWithPagination: (query: string): Promise<any> =>
|
||||
apiClient.get(`${endpoints.USER.DOCS_PAGINATED}?${query}`),
|
||||
checkDocs: (data: any): Promise<any> =>
|
||||
apiClient.post(endpoints.USER.DOCS_CHECK, data),
|
||||
getAPIKeys: (): Promise<any> => apiClient.get(endpoints.USER.API_KEYS),
|
||||
|
||||
Reference in New Issue
Block a user