@unchainedshop/ticketing 4.8.7 → 4.8.9
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.
|
@@ -25,7 +25,7 @@ const appleWalletHandler = async (req, res) => {
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
const { hash } = req.query;
|
|
28
|
-
const correctHash = await modules.warehousing.
|
|
28
|
+
const correctHash = await modules.warehousing.buildAccessKeyFromToken(token);
|
|
29
29
|
if (!hash || hash !== correctHash) {
|
|
30
30
|
res.status(403).send('Token hash invalid for current owner');
|
|
31
31
|
return;
|
|
@@ -27,7 +27,7 @@ const appleWalletHandler = async (req, reply) => {
|
|
|
27
27
|
return reply.send();
|
|
28
28
|
}
|
|
29
29
|
const { hash } = req.query;
|
|
30
|
-
const correctHash = await modules.warehousing.
|
|
30
|
+
const correctHash = await modules.warehousing.buildAccessKeyFromToken(token);
|
|
31
31
|
if (!hash || hash !== correctHash) {
|
|
32
32
|
logger.error('Token hash invalid for current owner', { tokenId });
|
|
33
33
|
reply.status(403);
|
|
@@ -19,7 +19,7 @@ export const googleWalletHandler = async (req, res) => {
|
|
|
19
19
|
res.status(404).send('Token not found');
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
const correctHash = await modules.warehousing.
|
|
22
|
+
const correctHash = await modules.warehousing.buildAccessKeyFromToken(token);
|
|
23
23
|
if (!hash || hash !== correctHash) {
|
|
24
24
|
res.status(403).send('Token hash invalid for current owner');
|
|
25
25
|
return;
|
|
@@ -21,7 +21,7 @@ const googleWalletHandler = async (req, reply) => {
|
|
|
21
21
|
reply.status(404);
|
|
22
22
|
return reply.send('Token not found');
|
|
23
23
|
}
|
|
24
|
-
const correctHash = await modules.warehousing.
|
|
24
|
+
const correctHash = await modules.warehousing.buildAccessKeyFromToken(token);
|
|
25
25
|
if (!hash || hash !== correctHash) {
|
|
26
26
|
logger.error('Token hash invalid for current owner', { tokenId });
|
|
27
27
|
reply.status(403);
|
package/lib/services.js
CHANGED
|
@@ -7,9 +7,7 @@ async function cancelTicketsForProduct(productId) {
|
|
|
7
7
|
await this.warehousing.invalidateToken(token._id);
|
|
8
8
|
await this.passes.cancelTicket(token._id);
|
|
9
9
|
}
|
|
10
|
-
await this.products.update(productId, {
|
|
11
|
-
$set: { 'meta.cancelled': true },
|
|
12
|
-
});
|
|
10
|
+
await this.products.update(productId, { 'meta.cancelled': true });
|
|
13
11
|
return tokensToCancel.length;
|
|
14
12
|
}
|
|
15
13
|
export default {
|
package/package.json
CHANGED