public async Task <IActionResult> AutenticateUser(string id, string password) { // Verify Credentials and retrieve user Doctor doc = await _doctorRepository.AuthenticateDoctor(id, password); if (doc == null) { return(BadRequest(doc)); } // Send OTP // Verify OTP // Send Doctor all his User Payload only return(new OkObjectResult(doc)); //response.DidError = true; //response.ErrorMessage = "There was an internal error, please contact to technical support." // Logger?.LogCritical("There was an error on '{0po' invocation: {1}", nameof(GetStockItemAsync), ex); }