Skip to content

Commit

Permalink
Update Delivery.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro-Hrebenyuk authored Nov 3, 2024
1 parent 886c5d5 commit 714ade2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main/java/flower/store/Delivery.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package flower.store;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.*;

@RestController
public class DeliveryController {
private final Delivery deliveryStrategy;

public DeliveryController() {
this.deliveryStrategy = new PostDeliveryStrategy();
}

@GetMapping("/delivery")
public String getDeliveryInfo() {
return deliveryStrategy.deliver(Arrays.asList(new Flower(), new Flower(), new Flower()));
}
}

0 comments on commit 714ade2

Please sign in to comment.