diff --git a/src/authx/auth.py b/src/authx/auth.py index 83ebd2e..bf64381 100644 --- a/src/authx/auth.py +++ b/src/authx/auth.py @@ -812,9 +812,10 @@ def approve_pending_user_in_opa(user_name): if status_code == 200: pending_users.pop(user_name) response3, status_code = set_service_store_secret("opa", key=f"pending_users", value=json.dumps(response)) + return {"message": f"User {user_name} has been approved"}, status_code + return response2, status_code else: return {"error": f"no pending user with ID {user_name}"}, 404 - return response, status_code def reject_pending_user_in_opa(user_name):