fix user id getter in completeCheckout

This commit is contained in:
2026-04-09 22:57:00 -06:00
parent 39e4a3896e
commit 666c7e0ca6

View File

@@ -246,7 +246,7 @@ public class CartService {
Cart cart = cartRepository.findById(cartId)
.orElseThrow(() -> new BusinessException("Cart not found"));
if (!cart.getUser().getUserId().equals(userId)) {
if (!cart.getUser().getId().equals(userId)) {
throw new BusinessException("Unauthorized");
}