diff --git a/Backend/user_service/user_service/user_app/views.py b/Backend/user_service/user_service/user_app/views.py index e0af73f..9358436 100644 --- a/Backend/user_service/user_service/user_app/views.py +++ b/Backend/user_service/user_service/user_app/views.py @@ -272,7 +272,12 @@ def available_username_email(self, request) -> Response: response_message = {"error": "email is not available"} status_code = status.HTTP_400_BAD_REQUEST else: - response_message = {"detail": "username and email are available"} + if email is not None and username is not None: + response_message = {"detail": "username and email are available"} + elif username is not None: + response_message = {"detail": "username is available"} + elif email is not None: + response_message = {"detail": "email is available"} else: response_message = {'error':"username and email fields are required"} status_code = status.HTTP_400_BAD_REQUEST