Remove duplicate code in controllers for find-many.