예제 #1
0
        public IHttpActionResult Update([FromBody] UserWithGoal userWithGoal, int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            string userId = User.Identity.GetUserId();

            userWithGoal.Id = userId;
            var updated = _packageRepositoty.BuyPackagePartGoal(userId, userWithGoal.PackageId);

            if (!updated)
            {
                return(NotFound());
            }

            return(Ok());
        }