module.exports = { friendlyName: 'View infrastructure-as-code', description: 'Display "Fleet infrastructure-as-code" page.', exits: { success: { viewTemplatePath: 'pages/infrastructure-as-code' }, badConfig: { responseType: 'badConfig' }, }, fn: async function () { if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.testimonials) || !sails.config.builtStaticContent.compiledPagePartialsAppPath) { throw {badConfig: 'builtStaticContent.testimonials'}; } // Get testimonials for the component. let testimonialsForScrollableTweets = _.uniq(_.clone(sails.config.builtStaticContent.testimonials), (quote)=>{ return quote.quoteAuthorName.toLowerCase(); }); // Respond with view. return { testimonialsForScrollableTweets }; } };