public async Task <ActionResult <User> > Register([FromBody] JObject data) { var registerResponse = await userOperation.RegisterUser(data); if (!registerResponse) { return(BadRequest()); } var registeredUser = await userOperation.GetCurrentUser((string)data["email"]); if (registeredUser == null) { return(BadRequest()); } return(registeredUser); }