Skip to content

Commit

Permalink
Add product info to passes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepdeJong committed Oct 2, 2023
1 parent a5b9dbf commit e36783d
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,16 @@ public byte[] getApplePass(Ticket ticket) throws TicketPassFailedException {
RestTemplate restTemplate = new RestTemplate();


Product product = ticket.getProduct();
Event event = product.getEvent();

Map<String, String> params = new HashMap<>();
params.put("title", ticket.getProduct().getTitle());
params.put("description", ticket.getProduct().getDescription());
params.put("date", ticket.getProduct().getEvent().getStart().format(DateTimeFormatter.ISO_LOCAL_DATE));
params.put("time", ticket.getProduct().getEvent().getStart().format(DateTimeFormatter.ofPattern("HH:mm")));
params.put("location", ticket.getProduct().getEvent().getLocation());
params.put("title", event.getTitle());
params.put("ticket", product.getTitle());
params.put("description", event.getDescription());
params.put("date", event.getStart().format(DateTimeFormatter.ISO_LOCAL_DATE));
params.put("time", event.getStart().format(DateTimeFormatter.ofPattern("HH:mm")));
params.put("location", event.getLocation());
params.put("name", ticket.getOwner().getName());
params.put("code", ticket.getUniqueCode());

Expand Down

0 comments on commit e36783d

Please sign in to comment.