mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-10-06 20:11:35 +00:00
feat(user): update user verification process to utilize TemporaryUser model and include verification status in response
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 5m54s
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 5m54s
This commit is contained in:
10
api/views.py
10
api/views.py
@@ -550,15 +550,19 @@ def filter_temporary_user(request):
|
||||
elif mobile:
|
||||
filters |= Q(t_mobile=mobile)
|
||||
|
||||
user = TemporaryUser.objects.only("t_id", "otp_verified").filter(filters).first()
|
||||
user = (
|
||||
TemporaryUser.objects.only("t_id", "otp_verified", "t_verified")
|
||||
.filter(filters)
|
||||
.first()
|
||||
)
|
||||
|
||||
print(f"Querying with filters: {filters}")
|
||||
print(f"Found temporary user: {user}")
|
||||
|
||||
return Response(
|
||||
{"ok": True, "otp_verified": user.otp_verified}
|
||||
{"ok": True, "otp_verified": user.otp_verified, "t_verified": user.t_verified}
|
||||
if user
|
||||
else {"ok": False, "otp_verified": False}
|
||||
else {"ok": False, "otp_verified": False, "t_verified": False}
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user