Skip to content

Commit

Permalink
fix: add missing extract all merged ids and group filters
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-gavanier committed Feb 15, 2024
1 parent 8a362a8 commit e57a44c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ describe('build api url', (): void => {
duplicates: false
});

expect(url).toBe('');
expect(url).toBe('or[mergedIds][exists]=true&or[group][exists]=false');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export const extractQueryString = ({
departements,
duplicates
}: Pick<ExtractOptions, 'departements' | 'duplicates'>): string => {
const mergedIds: string = duplicates ? 'and[mergedIds][exists]=false' : '';
const mergedIds: string = duplicates ? 'and[mergedIds][exists]=false' : 'or[mergedIds][exists]=true&or[group][exists]=false';
return departements == null ? mergedIds : `${mergedIds}&adresse[beginsWith][code_insee]=${departements}`;
};

0 comments on commit e57a44c

Please sign in to comment.