Files
fleet/website/api/controllers/view-customers.js
T
3eadc49407 Remove 52 case studies from fleetdm.com and social proof handbook (#48669)
## Changes

- Deleted 52 anonymous case study article files from the `articles/`
directory
- Removed all anonymous case study sections (financial services,
technology & SaaS, security/IT/healthcare/other) from
`handbook/marketing/fleet-social-proof.md`
- Removed 21 redirect entries from `website/config/routes.js` that
pointed to these removed case studies

The named customer stories (Stripe, Foursquare, Faire, Thumbtack,
Deputy, Fastly) and customer testimonials are preserved.

---

Built for [Irena
Reedy](https://fleetdm.slack.com/archives/D0APYC9R9SL/p1783033337222849?thread_ts=1775761161.561979&cid=D0APYC9R9SL)
by [Kilo for Slack](https://kilo.ai/slack)

---------

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: Irena Reedy <irena@fleetdm.com>
Co-authored-by: Eric <eashaw@sailsjs.com>
2026-07-03 11:06:35 -05:00

82 lines
2.4 KiB
JavaScript
Vendored

module.exports = {
friendlyName: 'View customers',
description: 'Display "Customers" page.',
exits: {
success: {
viewTemplatePath: 'pages/customers'
}
},
fn: async function () {
if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.testimonials) || !sails.config.builtStaticContent.compiledPagePartialsAppPath) {
throw {badConfig: 'builtStaticContent.testimonials'};
}
if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.markdownPages) || !sails.config.builtStaticContent.compiledPagePartialsAppPath) {
throw {badConfig: 'builtStaticContent.markdownPages'};
}
// Get testimonials for the page contents
let testimonials = _.clone(sails.config.builtStaticContent.testimonials);
let sortOrderOfTestimonialAuthorsShownOnThisPage = [
'Scott MacVicar',
'Adam Anklewicz',
'Nick Fohs',
'Wes Whetstone',
'Erik Gomez',
'Matt Carr',
'nico waisman',
'Kenny Botelho',
'Dan Grzelak',
'Eric Tan',
];
let testimonialAuthorsToExcludeOnThisPage = [
'Alvaro Gutierrez',
'Joe Pistone',
'Brendan Shaklovitz',
'Abubakar Yousafzai',
'Dhruv Majumdar',
'matt carr',
'Charles Zaffery',
'Tom Larkin',// Note: excluded becasue we already show a quote from this person
'Nico Waisman',// Note: excluded becasue we already show a quote from this person
];
let filteredTestimonialsForThisPage = _.filter(testimonials, (testimonial)=>{
return !testimonialAuthorsToExcludeOnThisPage.includes(testimonial.quoteAuthorName);
});
filteredTestimonialsForThisPage.sort((a, b)=>{
if(sortOrderOfTestimonialAuthorsShownOnThisPage.indexOf(a.quoteAuthorName) === -1){
return 1;
} else if(sortOrderOfTestimonialAuthorsShownOnThisPage.indexOf(b.quoteAuthorName) === -1) {
return -1;
}
return sortOrderOfTestimonialAuthorsShownOnThisPage.indexOf(a.quoteAuthorName) - sortOrderOfTestimonialAuthorsShownOnThisPage.indexOf(b.quoteAuthorName);
});
let testimonialsWithVideoLinks = _.filter(filteredTestimonialsForThisPage, (testimonial)=>{
return testimonial.youtubeVideoUrl;
});
return {
testimonials: filteredTestimonialsForThisPage,
testimonialsWithVideoLinks,
};
}
};