public Keep EditKeep(int id, [FromBody] Keep editKeep) { if (ModelState.IsValid) { var user = HttpContext.User.Identity.Name; return(_db.EditKeep(id, editKeep, user)); } return(null); }
public ActionResult <Keep> Put(int id, [FromBody] Keep keep) { Keep result = _repo.EditKeep(id, keep); if (result != null) { return(result); } return(NotFound()); }
public Keep EditKeep([FromBody] Keep keep) { if (ModelState.IsValid) { Keep newKeep = _db.EditKeep(keep); if (newKeep != null) { return(newKeep); } } return(null); }
public Keep EditKeep(int id, [FromBody] Keep newKeep) { return(_db.EditKeep(id, newKeep)); }
public Keep Put(int keepId, [FromBody] Keep keep) { keep.Id = keepId; keep.UserId = HttpContext.User.Identity.Name; return(_keepRepo.EditKeep(keep)); }