Remove custom list code

This commit is contained in:
Nico Schottelius 2018-12-30 22:52:27 +01:00
parent 1e2d834c59
commit 0eb09c31d8

View file

@ -33,17 +33,6 @@ class OTPVerifyViewSet(viewsets.ModelViewSet):
serializer_class = OTPSerializer serializer_class = OTPSerializer
queryset = OTPSeed.objects.all() queryset = OTPSeed.objects.all()
def list(self, request):
print("Liiiiiiiisting")
# data = serializers.serialize('json', self.get_queryset())
# return HttpResponse(data, content_type="application/json")
obj = [(o.name, o.realm, o.seed) for o in OTPSeed.objects.all()]
# obj = OTPSeed.objects.all()
return Response(obj)
# return Response({'LISTstatus': 'OK'})
@action(detail=False, methods=['post']) @action(detail=False, methods=['post'])
def verify(self, request): def verify(self, request):