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

Commit 3a43fbc

Browse files
Renaming of the file done
1 parent 70a5d6a commit 3a43fbc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
65 Bytes
Binary file not shown.

Profile/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ def post(self, request, format=None):
162162
try:
163163
verify_pin_obj = VerifyUser.objects.get(user=user)
164164
if verify_pin_obj.pin == pin and timezone.now() <= verify_pin_obj.created_at + timezone.timedelta(minutes=5):
165+
user.is_active = True
166+
user.save()
165167
return Response({'message': 'Pin verified successfully'}, status=status.HTTP_200_OK)
166168
else:
167169
return Response({'message': 'Invalid or expired PIN'}, status=status.HTTP_400_BAD_REQUEST)

0 commit comments

Comments
 (0)