Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Commit 3cd1919

Browse files
2 parents 931f1e9 + 4a66897 commit 3cd1919

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Profile/views.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525

2626
User = get_user_model()
2727

28-
ALLOWED_EMAIL_PROVIDERS = ["tutanota.com", "protonmail.com", "zoho.com", "hubspot.com", "mail.com", "gmx.com", "yandex.com",
29-
"pm.com", 'gmail.com', 'yahoo.com', 'icloud.com', "outlook.com", "hotmail.com", "aol.com", "aim.com", "titan.email"]
28+
ALLOWED_EMAIL_PROVIDERS = ['gmail.com']
3029

3130

3231
class UserViewSet(viewsets.ModelViewSet):
@@ -46,7 +45,7 @@ def create(self, request, *args, **kwargs):
4645
domain = email.split('@')[1]
4746
if domain not in ALLOWED_EMAIL_PROVIDERS:
4847
# Return an error response if email provider is not allowed
49-
return Response({"message": "Signups from this email provider are not allowed."}, status=status.HTTP_400_BAD_REQUEST)
48+
return Response({"message": "Please Use Gmail Account Only"}, status=status.HTTP_400_BAD_REQUEST)
5049
else:
5150
# Return an error response if email is not provided
5251
return Response({"message": "Please provide an email address."}, status=status.HTTP_400_BAD_REQUEST)
@@ -136,7 +135,7 @@ def SendVerificationEmail(username, email):
136135
# Sending the Email
137136

138137
context = {"username": User.objects.get(email=email).username, "pin": pin}
139-
email_body = render_to_string('mail/verifyUser.html', context)
138+
email_body = render_to_string('mail/verifyUser.Html', context)
140139

141140
email = EmailMessage(
142141
'Complete Your Signup On ZoloEarn',
@@ -720,4 +719,4 @@ def get(self, request, format=None):
720719

721720
referral_data.append({'referred_user': referred_user, 'wallet_points': referred_wallet_points})
722721

723-
return Response(referral_data)
722+
return Response(referral_data)

0 commit comments

Comments
 (0)