mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Slight tweak to the subscriptionStats, clearing out duplicate customers gotten from invoices.
This commit is contained in:
parent
b04a24880a
commit
d0ebd50339
1 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,8 @@
|
|||
|
||||
require('coffee-script');
|
||||
require('coffee-script/register');
|
||||
_ = require('lodash');
|
||||
|
||||
config = require('../../server_config');
|
||||
if(config.stripe.secretKey.indexOf('sk_test_')==0) {
|
||||
throw new Error('You should not run this on the test data... Get your environment in gear.');
|
||||
|
@ -36,7 +38,7 @@ onInvoicesReceived = function(err, invoices) {
|
|||
begin(invoices.data[i].id);
|
||||
}
|
||||
else {
|
||||
console.log('How many customers paid for a subscription:', customersPaid.length);
|
||||
console.log('How many customers paid for a subscription:', _.unique(customersPaid).length);
|
||||
loadNewCustomers();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue