Пример #1
0
 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;
 }
Пример #2
0
        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"));
        }
Пример #3
0
        public ActionResult <Keep> Put(int id, [FromBody] Keep keep)
        {
            Keep result = _repo.EditKeep(id, keep);

            if (result != null)
            {
                return(result);
            }
            return(NotFound());
        }
Пример #4
0
        public ActionResult <Keep> Edit(int id, [FromBody] Keep editedKeep)
        {
            Keep updatedKeep = _kr.EditKeep(editedKeep);

            if (updatedKeep == null)
            {
                return(BadRequest("Cannot Edit"));
            }
            return(Ok(updatedKeep));
        }
Пример #5
0
        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));
        }
Пример #6
0
 public string Put(int id, [FromBody] Keep keep)
 {
     db.EditKeep(keep);
     return("Updated");
 }
Пример #7
0
 public Keep EditKeep(int id, [FromBody] Keep newKeep)
 {
     return(_db.EditKeep(id, newKeep));
 }
Пример #8
0
 public Keep Put(int id, [FromBody] Keep newKeep)
 {
     return(_repo.EditKeep(id, newKeep));
 }