Beispiel #1
0
        public ActionResult <RideOverviewDto> Add(CreateRideDto model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            int userId = this.GetCurrentUserId();

            int rideId = SaveRide(userId, model);

            Analyser.AnalyseRide(context, userId, rideId);

            return(GetRideOverview(rideId));
        }