push
This commit is contained in:
@@ -163,7 +163,7 @@ export async function purchase(
|
||||
if ((await countActiveEntitlements(ip, product.id)) >= 1)
|
||||
throw new PurchaseError("Déjà débloqué", 409);
|
||||
grants.push({ kind: product.id });
|
||||
if (product.id === "element-skin") visiblePerkChanged = false; // viewer-scoped
|
||||
if (product.id === "element-skin" || product.id === "ip-colors") visiblePerkChanged = false; // viewer-scoped
|
||||
break;
|
||||
}
|
||||
case "consumable": {
|
||||
@@ -176,6 +176,14 @@ export async function purchase(
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "send-skin": {
|
||||
if ((await countActiveEntitlements(ip, product.id)) >= 1)
|
||||
throw new PurchaseError("Déjà débloqué", 409);
|
||||
let skinMeta: any = {};
|
||||
try { skinMeta = product.metaJson ? JSON.parse(product.metaJson) : {}; } catch {}
|
||||
grants.push({ kind: product.id, meta: skinMeta });
|
||||
break;
|
||||
}
|
||||
case "bundle": {
|
||||
// Cosmetic bundle: Style Doré + 1 pet.
|
||||
if ((await countActiveEntitlements(ip, "style-dore")) < 1)
|
||||
|
||||
Reference in New Issue
Block a user