Ejemplo n.º 1
0
        public IActionResult GetRider(RiderRequestData RequestData)
        {
            if (!_service.IsAuthorizedRider(RequestData))
            {
                return(Unauthorized());
            }

            Rider rider = _service.GetRider(RequestData);

            if (rider != null)
            {
                return(Ok(rider));
            }

            return(NotFound());
        }
Ejemplo n.º 2
0
        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);
        }