fleet/website/api/controllers/view-infrastructure-as-code.js
Mike Thomas 63e6375c10
Renamed fleet-gitops => infrastructure-as-code (#41520)
- Renamed fleet-gitops => infrastructure-as-code
- Changed the URL (maintaining backwards compatibility)

---------

Co-authored-by: Eric <[email protected]>
2026-03-12 12:54:17 +09:00

40 lines
892 B
JavaScript
Vendored

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 <scrolalble-tweets> component.
let testimonialsForScrollableTweets = _.uniq(_.clone(sails.config.builtStaticContent.testimonials), (quote)=>{
return quote.quoteAuthorName.toLowerCase();
});
// Respond with view.
return {
testimonialsForScrollableTweets
};
}
};