temporary update for model.py and view.opy

This commit is contained in:
2024-07-20 12:09:53 +00:00
parent 13b305e2b9
commit db5ff3181f
2 changed files with 29 additions and 6 deletions

View File

@ -703,5 +703,10 @@ class VerifyEmailView(APIView):
team_name=temp_user.team_name,
group=temp_user.group
)
temp_user.delete()
return Response({"message": "Email verified. Registration complete."}, status=status.HTTP_200_OK)
except TempUser.DoesNotExist:
return Response({"error": "Invalid verification code."}, status=status.HTTP_400_BAD_REQUEST)