public IActionResult GetTraveler(string id) { var travelerFromRepo = _libraryRepository.GetTraveler(id); if (travelerFromRepo == null) { return(NotFound()); } Models.TravelerDto traveler = CustomMapper.TravelerRepoToTravelerUI(travelerFromRepo); return(Ok(traveler)); }
public ActionResult <IEnumerable <string> > ListTrips(string travelerId) { if (!travelerRepository.TravelerExists(travelerId)) { return(NotFound()); } var usuario = travelerRepository.GetTraveler(travelerId); var tripsFromRepo = TripsRepository.ListTrips(usuario.Id); return(Ok(tripsFromRepo)); //Retonar un codigo 200 }