public User Add([FromBody] User newUser) { // Log the API call _logger.LogInformation("Adding a new user to persistent storage"); // Get or create the user that matches the passed in username var user = _landmarkRepository.GetUser(newUser.Username); if (user == null) { user = _landmarkRepository.AddUser(newUser.Username, newUser.Fullname ?? newUser.Username); } // Return the freshly created user object return(user); }