Skip to content

Commit

Permalink
Add name to passes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepdeJong committed Oct 2, 2023
1 parent 7d50815 commit 3498b5f
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,16 +269,17 @@ public byte[] getApplePass(Ticket ticket) throws TicketPassFailedException {


Map<String, String> params = new HashMap<>();
params.put("name", ticket.getProduct().getTitle());
params.put("title", ticket.getProduct().getTitle());
params.put("description", ticket.getProduct().getDescription());
// Format date as yyyy-MM-dd
params.put("date", ticket.getProduct().getEvent().getStart().format(DateTimeFormatter.ISO_LOCAL_DATE));
params.put("time", ticket.getProduct().getEvent().getStart().format(DateTimeFormatter.ISO_LOCAL_TIME));
params.put("time", ticket.getProduct().getEvent().getStart().format(DateTimeFormatter.ofPattern("HH:mm")));
params.put("location", ticket.getProduct().getEvent().getLocation());
params.put("name", ticket.getOwner().getName());
params.put("code", ticket.getUniqueCode());

return restTemplate.getForObject(passesLink +
"?name={name}&description={description}&date={date}&time={time}&location={location}&code={code}"
"?title={title}&description={description}&date={date}&time={time}" +
"&location={location}&code={code}&name={name}"
, byte[].class, params);
} catch (Exception e) {
e.printStackTrace();
Expand Down

0 comments on commit 3498b5f

Please sign in to comment.