@unchainedshop/ticketing 4.8.5 → 4.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/fastify.js CHANGED
@@ -4,7 +4,7 @@ import printTicketsHandler from "./pdf-tickets/print-handler-fastify.js";
4
4
  export default (app) => {
5
5
  const { APPLE_WALLET_WEBSERVICE_PATH = '/rest/apple-wallet', GOOGLE_WALLET_WEBSERVICE_PATH = '/rest/google-wallet', UNCHAINED_PDF_PRINT_HANDLER_PATH = '/rest/print_tickets', } = process.env;
6
6
  app.route({
7
- url: `${APPLE_WALLET_WEBSERVICE_PATH}*`,
7
+ url: `${APPLE_WALLET_WEBSERVICE_PATH}/*`,
8
8
  method: ['GET', 'POST', 'DELETE'],
9
9
  handler: appleWalletHandler,
10
10
  });
@@ -13,6 +13,11 @@ export default (app) => {
13
13
  method: 'GET',
14
14
  handler: googleWalletHandler,
15
15
  });
16
+ app.route({
17
+ url: `${UNCHAINED_PDF_PRINT_HANDLER_PATH}`,
18
+ method: 'GET',
19
+ handler: printTicketsHandler,
20
+ });
16
21
  app.route({
17
22
  url: `${UNCHAINED_PDF_PRINT_HANDLER_PATH}/*`,
18
23
  method: 'GET',
@@ -8,7 +8,7 @@ const isAuthenticationTokenCorrect = (req, authenticationToken) => {
8
8
  const appleWalletHandler = async (req, reply) => {
9
9
  const resolvedContext = req.unchainedContext;
10
10
  const { modules } = resolvedContext;
11
- const path = req.url;
11
+ const path = '/' + (req.params['*'] || '').split('?')[0];
12
12
  logger.info(`${path} (${JSON.stringify(req.query)})`);
13
13
  if (path.startsWith('/download/')) {
14
14
  try {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unchainedshop/ticketing",
3
3
  "description": "Event ticketing extension for the Unchained Engine with PDF and wallet pass support",
4
- "version": "4.8.5",
4
+ "version": "4.8.7",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
7
  "type": "module",