From 8b9497ec3349a584c90d2ac782c634f7f328c19f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 16 Feb 2023 20:37:32 -0800 Subject: check eligibility on buy --- routes/payments.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routes/payments.js b/routes/payments.js index 633b94ee..51172251 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -257,6 +257,8 @@ export default { }, async buy({ body: { amount, number, year, month, cvc }, user }, res) { + if (!user.eligible) fail("not eligible"); + let stripe = "https://api.stripe.com/v1"; let { stripe: username } = config; -- cgit v1.2.3