From 7eb7b9c05c9a139bb1efe0a481537a7983940539 Mon Sep 17 00:00:00 2001 From: Joep de Jong Date: Mon, 2 Oct 2023 16:07:14 +0200 Subject: [PATCH] Add name to passes (#447) --- .../events/core/service/ticket/TicketServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/wisv/events/core/service/ticket/TicketServiceImpl.java b/src/main/java/ch/wisv/events/core/service/ticket/TicketServiceImpl.java index 98e9cbf3..ea81ac2a 100644 --- a/src/main/java/ch/wisv/events/core/service/ticket/TicketServiceImpl.java +++ b/src/main/java/ch/wisv/events/core/service/ticket/TicketServiceImpl.java @@ -269,16 +269,17 @@ public byte[] getApplePass(Ticket ticket) throws TicketPassFailedException { Map 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();