Add email to the forgot-password response

remotes/origin/enhancement/email-actions
David Barragán Merino 2014-07-09 14:10:58 +02:00
parent a07c6a9590
commit 8292a11170
1 changed files with 2 additions and 1 deletions

View File

@ -89,7 +89,8 @@ class UsersViewSet(ModelCrudViewSet):
email = mbuilder.password_recovery(user.email, {"user": user}) email = mbuilder.password_recovery(user.email, {"user": user})
email.send() email.send()
return Response({"detail": _("Mail sended successful!")}) return Response({"detail": _("Mail sended successful!"),
"email": user.email})
@list_route(permission_classes=[AllowAny], methods=["POST"]) @list_route(permission_classes=[AllowAny], methods=["POST"])
def change_password_from_recovery(self, request, pk=None): def change_password_from_recovery(self, request, pk=None):