Skip to content

Commit

Permalink
Cyberleague: [premieroctet#117] Add name, picture and baseline fields…
Browse files Browse the repository at this point in the history
… to related companies
  • Loading branch information
Bastien-Wappizy committed Sep 12, 2024
1 parent a94bf43 commit df852c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/web/server/plugins/cyberleague/related.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const compareCompanies = (company, expertises) => {
const getRelated = (model) => {
if (model == `company`) {
return async (userId, params, data) => {
const companies = await loadFromDb({model: `company`, fields: [`expertise_set.expertises`]})
const companies = await loadFromDb({model: `company`, fields: [`expertise_set.expertises`, `name`, `picture`, `baseline`]})
return lodash.orderBy(lodash.filter(companies, (c) => !idEqual(data._id,c._id)), (c) => compareCompanies(c, data.expertise_set?.expertises), `desc`).slice(0, 10)
}
}
Expand Down

0 comments on commit df852c4

Please sign in to comment.