Example #1
0
        public IHttpActionResult Put(TripEdit model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var noteService = new TripService(Guid.Parse(User.Identity.GetUserId()));
            var temp        = noteService.GetTripById(model.TripID);

            if (temp == null)
            {
                return(NotFound());
            }

            return(Ok(noteService.EditTrip(model)));
        }