showing stripe subscribers. loading really slow.

This commit is contained in:
metacryst
2026-03-05 05:41:45 -06:00
parent 661bf86a1a
commit 4061e86ce7
5 changed files with 57 additions and 17 deletions

View File

@@ -48,12 +48,16 @@ export default class PaymentsHandler {
}
}
static async getCustomers() {
static async getCustomers(networkId) {
let network = global.db.networks.get(networkId)
if(!network.stripeAccountId) {
throw new Error("Can't get customers for account that doesn't exist!")
}
const customers = await stripe.customers.list(
{ limit: 100 },
{ stripeAccount: 'acct_connected_account_id' }
{ stripeAccount: network.stripeAccountId }
);
console.log(customers)
return customers
}
static async newSubscription(req, res) {