Skip to content

Commit

Permalink
Merge pull request #2272 from aswanthabam/dev
Browse files Browse the repository at this point in the history
fix(wadhwani): give error message if mobile number not provided.
  • Loading branch information
aswanthabam authored Nov 9, 2024
2 parents 23d3cbb + c9b0c70 commit af6cd7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/integrations/wadhwani/wadhwani_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def post(self, request):
url = settings.WADHWANI_BASE_URL + "/api/v1/iamservice/oauth/login"
user_id = JWTUtils.fetch_user_id(request)
user = User.objects.get(id=user_id)
if not user.mobile:
return CustomResponse(
general_message="Please update your mobile number and try again."
).get_failure_response()
if not (token := request.data.get("Client-Auth-Token", None)):
return CustomResponse(
general_message="Token is required"
Expand Down

0 comments on commit af6cd7a

Please sign in to comment.