mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-26 02:53:46 +03:00
refactor allow VerifyEmailView display data field in swagger
This commit is contained in:
parent
f200b8d6f0
commit
d2917e9f3f
|
@ -69,8 +69,11 @@ class VerifyEmailView(APIView, ConfirmEmailView):
|
||||||
permission_classes = (AllowAny,)
|
permission_classes = (AllowAny,)
|
||||||
allowed_methods = ('POST', 'OPTIONS', 'HEAD')
|
allowed_methods = ('POST', 'OPTIONS', 'HEAD')
|
||||||
|
|
||||||
|
def get_serializer(self, *args, **kwargs):
|
||||||
|
return VerifyEmailSerializer(*args, **kwargs)
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
serializer = VerifyEmailSerializer(data=request.data)
|
serializer = self.get_serializer(data=request.data)
|
||||||
serializer.is_valid(raise_exception=True)
|
serializer.is_valid(raise_exception=True)
|
||||||
self.kwargs['key'] = serializer.validated_data['key']
|
self.kwargs['key'] = serializer.validated_data['key']
|
||||||
confirmation = self.get_object()
|
confirmation = self.get_object()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user