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

Commit 4a66897

Browse files
Update views.py
1 parent 6055a64 commit 4a66897

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Profile/views.py

Lines changed: 2 additions & 3 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)

0 commit comments

Comments
 (0)