showing stripe subscribers. loading really slow.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user