k
This commit is contained in:
		
							
								
								
									
										9
									
								
								src/pages/AdminPage/hooks/useRolesList.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/pages/AdminPage/hooks/useRolesList.tsx
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
import ObjectList from "../../../hooks/objectList.tsx";
 | 
			
		||||
import {RoleService} from "../../../client";
 | 
			
		||||
 | 
			
		||||
const useRolesList = () => ObjectList({
 | 
			
		||||
    queryFn: RoleService.getAllRoles,
 | 
			
		||||
    getObjectsFn: response => response.roles,
 | 
			
		||||
    queryKey: "getAllRoles"
 | 
			
		||||
})
 | 
			
		||||
export default useRolesList;
 | 
			
		||||
		Reference in New Issue
	
	Block a user