Merge branch 'main' of https://git.kerboul.me/anto/XIP
Some checks failed
Deploy XIP / deploy (push) Failing after 1s
Some checks failed
Deploy XIP / deploy (push) Failing after 1s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { prisma } from "./prisma";
|
||||
import { spend, getWallet, InsufficientCreditsError } from "./wallet";
|
||||
import { isLocalhost } from "./ip";
|
||||
import { isFree } from "./ip";
|
||||
import { invalidatePerks, getPerksForIp } from "./perks";
|
||||
|
||||
/**
|
||||
@@ -105,7 +105,7 @@ export async function purchase(
|
||||
const product = await getProduct(productId);
|
||||
if (!product || !product.active) throw new PurchaseError("Produit introuvable", 404);
|
||||
|
||||
const free = isLocalhost(ip);
|
||||
const free = isFree(ip);
|
||||
const price = effectivePrice(product, options);
|
||||
|
||||
// Resolve which entitlement kind(s) this grants + per-IP limit checks.
|
||||
|
||||
Reference in New Issue
Block a user