コード例 #1
0
        public ActionResult <Keep> EditK(int id, [FromBody] Keep updatedKeep)
        {
            try
            {
                //string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
                // NOTE DONT TRUST THE USER TO TELL YOU WHO THEY ARE!!!!
                // updatedKeep.UserId = updatedKeep.UserId;
                updatedKeep.Id = id;

                return(Ok(_ks.EditK(updatedKeep)));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }