Beispiel #1
0
        public ActionResult <Keep> Post([FromBody] Keep newkeep)
        {
            var id = HttpContext.User.Identity.Name;

            newkeep.UserId = id;
            return(Ok(_keepRepo.AddKeep(newkeep)));
        }
Beispiel #2
0
        public ActionResult <Keep> Post([FromBody] Keep keep)
        {
            keep.UserId = HttpContext.User.Identity.Name;
            Keep result = _repo.AddKeep(keep);

            if (result != null)
            {
                return(Ok(result));
            }
            return(BadRequest("Unable to post"));
        }