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 <string> EditKeep([FromBody] Keep editedKeep) { int result = _kr.EditKeep(editedKeep); if (result == 1) { return(Ok("edit complete")); } return(BadRequest("Could not modify keep")); }
public ActionResult <Keep> Put(int id, [FromBody] Keep keep) { Keep result = _repo.EditKeep(id, keep); if (result != null) { return(result); } return(NotFound()); }
public ActionResult <Keep> Edit(int id, [FromBody] Keep editedKeep) { Keep updatedKeep = _kr.EditKeep(editedKeep); if (updatedKeep == null) { return(BadRequest("Cannot Edit")); } return(Ok(updatedKeep)); }
public ActionResult <Keep> Edit(int id, [FromBody] Keep editedKeep) { Keep updatedKeep = _kr.EditKeep(id, editedKeep); if (updatedKeep == null) { return(BadRequest("Unable to update keep.")); } return(Ok(updatedKeep)); }
public string Put(int id, [FromBody] Keep keep) { db.EditKeep(keep); return("Updated"); }
public Keep EditKeep(int id, [FromBody] Keep newKeep) { return(_db.EditKeep(id, newKeep)); }
public Keep Put(int id, [FromBody] Keep newKeep) { return(_repo.EditKeep(id, newKeep)); }