public IActionResult GetRider(RiderRequestData RequestData) { if (!_service.IsAuthorizedRider(RequestData)) { return(Unauthorized()); } Rider rider = _service.GetRider(RequestData); if (rider != null) { return(Ok(rider)); } return(NotFound()); }
public async Task <IActionResult> GetRider([FromRoute] int idRider) { var result = await riderService.GetRider(idRider); return(Ok(result)); }
public async Task <IEnumerable <Rider> > Get(int id) { var riders = await _riderService.GetRider(id); return(riders); }