Skip to content

Commit

Permalink
refactor: parseSearchQueryParamFunction name
Browse files Browse the repository at this point in the history
  • Loading branch information
rboixaderg committed Apr 22, 2024
1 parent 03b9566 commit 9ceee86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/guillo-gmi/hooks/useRegistry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface IRegistry {
fieldsToFilter: {
[key: string]: string[]
}
parsedSearchQueryParam: {
parseSearchQueryParamFunction: {
[key: string]: (query: string, type: string) => string
}
defaultSortValue: {
Expand Down Expand Up @@ -147,7 +147,7 @@ const registry: IRegistry = {
fieldsToFilter: {
UserManager: ['id', 'email', 'user_name'],
},
parsedSearchQueryParam: {},
parseSearchQueryParamFunction: {},
defaultSortValue: {},
}

Expand Down Expand Up @@ -251,7 +251,7 @@ const getSearchEngineQueryParamsFunction = (type: string) => {
}

const getParsedSearchQueryParam = (query: string, type: string) => {
const parsedFunction = registry.parsedSearchQueryParam[type]
const parsedFunction = registry.parseSearchQueryParamFunction[type]
if (!parsedFunction) {
const fieldsToFilter = getFieldsToFilter(type)
return buildQs(parser(query, fieldsToFilter))
Expand Down

0 comments on commit 9ceee86

Please sign in to comment.