예제 #1
0
 public IActionResult Put([FromBody] Plane plane, [FromRoute] int id)
 {
     if (id != plane.Id)
     {
         return(Conflict("Nie można edytować id!"));
     }
     else
     {
         var isUpdateSuccessful = planeService.Put(plane, id);
         if (isUpdateSuccessful)
         {
             return(NoContent());
         }
         else
         {
             return(NotFound());
         }
     }
 }