Exemplo n.º 1
0
        public ActionResult Post([FromBody] PhoneRideRequest request)
        {
            RidesService ridesService = new RidesService();

            return(ridesService.Post(request));
            // if (request.dropoffs == null || request.passengers == null || request.firstName == null ||
            //     request.homeAddress == null || request.pickupLocation == null || request.cellPhoneNumber == null)
            // {
            //     return BadRequest();
            // }

            // var convertedRideRequest = new RideRequest()
            // {
            //     Pickup = request.pickupLocation,
            //     PhoneNumber = request.cellPhoneNumber,
            //     NumberOfPeople = request.passengers,
            //     Destination = request.homeAddress,
            //     PatronName = request.firstName
            // };

            // try
            // {
            //     DBConnector db = new DBConnector();
            //     db.InsertRide(convertedRideRequest);
            // }
            // catch (Exception ex)
            // {
            //     Console.WriteLine(ex);
            //     return StatusCode(500);
            // }
            // return Ok();
        }