From 3b205d80a5b51319e43bdbf59d93bce2ed2ccf22 Mon Sep 17 00:00:00 2001 From: reynisson Date: Sat, 20 Nov 2021 22:39:20 +0100 Subject: [PATCH] using the bidders auction house uri --- .../adapter/out/web/AuctionWonEventHttpAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/out/web/AuctionWonEventHttpAdapter.java b/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/out/web/AuctionWonEventHttpAdapter.java index 4583892..2178fb4 100644 --- a/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/out/web/AuctionWonEventHttpAdapter.java +++ b/tapas-auction-house/src/main/java/ch/unisg/tapas/auctionhouse/adapter/out/web/AuctionWonEventHttpAdapter.java @@ -57,9 +57,10 @@ public class AuctionWonEventHttpAdapter implements AuctionWonEventPort { new Task.ServiceProvider("TODO") ); + var bidderAuctionHouseUri = event.getWinningBid().getBidderAuctionHouseUri().getValue().toString(); String body = TaskJsonRepresentation.serialize(task); LOGGER.info(body); - var postURI = URI.create(auction.get().getAuctionHouseUri().getValue().toString() + "/taskwinner"); + var postURI = URI.create(bidderAuctionHouseUri + "/taskwinner"); HttpRequest postRequest = HttpRequest.newBuilder() .uri(postURI) .header("Content-Type", TaskJsonRepresentation.MEDIA_TYPE)