add hint why stuff works

This commit is contained in:
Nico Schottelius 2018-12-24 20:58:08 +01:00
parent 8636d3f81a
commit 6377187004
1 changed files with 7 additions and 1 deletions

View File

@ -16,9 +16,15 @@ class OTPVerifyViewSet(viewsets.ModelViewSet):
@action(detail=False, methods=['post'])
def verify(self, request):
"""the standard serializer above already verified that
(name, realm, token) is valid.
Now we inspect the verify-prefixed names and return ok,
if they also verify
"""
serializer = VerifySerializer(data=request.data)
if serializer.is_valid():
# print(serializer)
serializer.save()
return Response({'status': 'OK'})