public IActionResult UpdateLike(int id, Like like) { if (id != like.Id) { return(BadRequest()); } try { likeRepository.UpdateLike(id, like); } catch (DbUpdateConcurrencyException) { if (!LikeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }