Skip to content

Commit

Permalink
Pricing api Fix after testing
Browse files Browse the repository at this point in the history
  • Loading branch information
NibrasAmmar01 committed Dec 27, 2024
1 parent 2076dac commit 56e1d90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
import lombok.Setter;

import java.util.List;
import java.util.UUID;


@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class CartItem {
private List<ItemRequest> items;
private UUID ProductId;
private int quantity;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
public class PricingService {
private WebClient webClient;
public PricingService(WebClient.Builder webClientBuilder) {
this.webClient = webClientBuilder.baseUrl("http://localhost:8086/cart-total").build();
this.webClient = webClientBuilder.baseUrl("http://localhost:8086/pricing/cart-total").build();
}

public cartResponse checkPrice(List<CartItem> cartItems) {


return webClient.post()
.uri("http://localhost:8086/cart-total")
.uri("http://localhost:8086/pricing/cart-total")
.bodyValue(cartItems)
.retrieve()
.bodyToMono(new ParameterizedTypeReference<cartResponse>() {})
Expand Down

0 comments on commit 56e1d90

Please sign in to comment.