fleet/website/api/controllers/customers/create-quote.js
Eric c77eb13aab
Website: Update Fleet Premium price in license dispenser (#11967)
Changes:
- Updated the price of Fleet Premium on
fleetdm.com/customers/new-license to match the price of Fleet premium on
fleetdm.com/pricing ($7.00/host/month)
- Updated the price of Fleet premium in `create-quote.js`

As this is merged, we will need to update the value of
`sails.config.custom.stripeSubscriptionPriceId` to be the id for the new
price in Stripe.
2023-05-29 20:23:19 -05:00

43 lines
565 B
JavaScript
Vendored

module.exports = {
friendlyName: 'Create quote',
description: '',
inputs: {
numberOfHosts: {
type: 'number',
required: true,
},
},
exits: {
},
fn: async function ({ numberOfHosts }) {
// Determine the price, 7 dollars * host * month (Billed anually)
let price = 7.00 * numberOfHosts * 12;
let quote = await Quote.create({
numberOfHosts: numberOfHosts,
quotedPrice: price,
organization: this.req.me.organization,
user: this.req.me.id,
}).fetch();
return quote;
}
};