diff options
| author | Adam Soltys <[email protected]> | 2023-02-16 20:37:32 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-02-16 20:37:32 -0800 |
| commit | 8b9497ec3349a584c90d2ac782c634f7f328c19f (patch) | |
| tree | 7626cef14bc2fd188fd00a0feb4007a320d6cdb5 | |
| parent | 38aa5fa9952bfce66e37fc0c92216bd477aba574 (diff) | |
| download | coinos-server-8b9497ec3349a584c90d2ac782c634f7f328c19f.tar.gz coinos-server-8b9497ec3349a584c90d2ac782c634f7f328c19f.zip | |
check eligibility on buy
| -rw-r--r-- | routes/payments.js | 2 |
1 files changed, 2 insertions, 0 deletions
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; |
