Skip to content

Commit

Permalink
renamed method params
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorovychh committed Jan 2, 2024
1 parent 0cc2adb commit b812e47
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ public class CartItemServiceImpl implements CartItemService {
private final BookRepository bookRepository;

@Override
public CartItemResponseDto updateById(Long cartItemId, int quantity) {
CartItem cartItemById = getById(cartItemId);
public CartItemResponseDto updateById(Long id, int quantity) {
CartItem cartItemById = getById(id);
cartItemById.setQuantity(quantity);
return cartItemMapper.toDto(cartItemRepository.save(cartItemById));
}

@Override
public void deleteCartItem(Long cartItemId) {
cartItemRepository.delete(getById(cartItemId));
public void deleteCartItem(Long id) {
cartItemRepository.delete(getById(id));
}

@Override
Expand Down

0 comments on commit b812e47

Please sign in to comment.