mirror of
https://github.com/fleetdm/fleet
synced 2026-05-11 19:19:03 +00:00
43 lines
564 B
JavaScript
Vendored
43 lines
564 B
JavaScript
Vendored
module.exports = {
|
|
|
|
|
|
friendlyName: 'Create quote',
|
|
|
|
|
|
description: '',
|
|
|
|
|
|
inputs: {
|
|
|
|
numberOfHosts: {
|
|
type: 'number',
|
|
required: true,
|
|
},
|
|
|
|
},
|
|
|
|
|
|
exits: {
|
|
|
|
},
|
|
|
|
|
|
fn: async function ({ numberOfHosts }) {
|
|
|
|
// Determine the price, 1 dollar * host * month (Billed anually)
|
|
let price = 2.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;
|
|
|
|
}
|
|
|
|
|
|
};
|