Exemple #1
0
 def retrieve(self, request, pk=None):
     employee = VisionsHelper.get_employee(pk)
     serializer = VisionsEmployeeSerializer(instance=employee)
     return Response(serializer.data)
Exemple #2
0
 def list(self, request):
     employees = VisionsHelper.get_all_employees()
     serializer = VisionsEmployeeSerializer(instance=employees, many=True)
     return Response(serializer.data)