Skip to content

Commit

Permalink
fix(UsersManager): fix search and pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeaturner committed Aug 16, 2024
1 parent 5daf883 commit a7ae914
Show file tree
Hide file tree
Showing 7 changed files with 336 additions and 501 deletions.
2 changes: 1 addition & 1 deletion client/src/Conductor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import ProjectTimeline from './components/projects/ProjectTimeline';
import ProjectView from './components/projects/ProjectView';
const Search = lazy(() => import('./screens/conductor/Search'));
import UserDetails from './components/controlpanel/UserDetails';
import UsersManager from './components/controlpanel/UsersManager';
const UsersManager = lazy(() => import('./screens/conductor/controlpanel/UsersManager'));
import LoadingSpinner from './components/LoadingSpinner';
const CentralIdentity = lazy(() => import('./screens/conductor/controlpanel/CentralIdentity'));
const CentralIdentityInstructorVerifications = lazy(() => import('./screens/conductor/controlpanel/CentralIdentity/CentralIdentityInstructorVerifications'));
Expand Down
15 changes: 15 additions & 0 deletions client/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,21 @@ class API {
async deleteCollectionResource(collID: string, resourceID: string) {
return await axios.delete<ConductorBaseResponse>(`/commons/collection/${collID}/resources/${resourceID}`);
}

// USERS (Control Panel)
async getUsers(params: {
query?: string;
page?: number;
limit?: number;
sort?: string;
}) {
return await axios.get<{
results: User[];
total_items: number;
} & ConductorBaseResponse>("/users", {
params
});
}
}

export default new API();
Loading

0 comments on commit a7ae914

Please sign in to comment.