Skip to content

Commit

Permalink
feat(search): set repository facet to private
Browse files Browse the repository at this point in the history
When the repository role is private or the repository text contains private
  • Loading branch information
jmiguelv committed Dec 18, 2024
1 parent c2bd991 commit e3e48f6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/lib/components/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ export function load({ sortAggregationsBy = 'key' } = {}) {
: item.layoutDesc?.layout?.rs?.ana === '#execution.rubrication'
? '#execution.rubrication'
: undefined;
const repository =
item.repository?.role?.toLowerCase().indexOf('private') !== -1 ||
item.repository?._?.toLowerCase().indexOf('private') !== -1
? 'Private'
: (item.repository?._?.trim() ?? undefined);

return {
...item,
Expand All @@ -141,7 +146,7 @@ export function load({ sortAggregationsBy = 'key' } = {}) {
technique: getHierarchicalValues(technique),
pigment: getHierarchicalValues(pigment),
damage: getHierarchicalValues(item.layoutDesc?.layout?.damage?.ana ?? undefined, false),
repository: item.repository?._?.trim() ?? undefined
repository
};
});

Expand Down

0 comments on commit e3e48f6

Please sign in to comment.