(feat:docs) sort

This commit is contained in:
ManishMadan2882
2024-11-05 00:44:02 +05:30
parent dbfc1bb68f
commit 877b165a9a
4 changed files with 40 additions and 9 deletions

View File

@@ -2,7 +2,8 @@ import apiClient from '../client';
import endpoints from '../endpoints';
const userService = {
getDocs: (): Promise<any> => apiClient.get(endpoints.USER.DOCS),
getDocs: (sort = 'date', order = 'desc'): Promise<any> =>
apiClient.get(`${endpoints.USER.DOCS}?sort=${sort}&order=${order}`),
checkDocs: (data: any): Promise<any> =>
apiClient.post(endpoints.USER.DOCS_CHECK, data),
getAPIKeys: (): Promise<any> => apiClient.get(endpoints.USER.API_KEYS),