public ActionResult <Keep> Post([FromBody] Keep newkeep) { var id = HttpContext.User.Identity.Name; newkeep.UserId = id; return(Ok(_keepRepo.AddKeep(newkeep))); }
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")); }