feat: Convert helpers to use JS files
This commit is contained in:
29
packages/backend/src/helpers/billing/plans.ee.js
Normal file
29
packages/backend/src/helpers/billing/plans.ee.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import appConfig from '../../config/app';
|
||||
|
||||
const testPlans = [
|
||||
{
|
||||
name: '10k - monthly',
|
||||
limit: '10,000',
|
||||
quota: 10000,
|
||||
price: '€20',
|
||||
productId: '47384',
|
||||
},
|
||||
];
|
||||
|
||||
const prodPlans = [
|
||||
{
|
||||
name: '10k - monthly',
|
||||
limit: '10,000',
|
||||
quota: 10000,
|
||||
price: '€20',
|
||||
productId: '826658',
|
||||
},
|
||||
];
|
||||
|
||||
const plans = appConfig.isProd ? prodPlans : testPlans;
|
||||
|
||||
export function getPlanById(id) {
|
||||
return plans.find((plan) => plan.productId === id);
|
||||
}
|
||||
|
||||
export default plans;
|
Reference in New Issue
Block a user