Skip to content

Commit

Permalink
fix: fix function name
Browse files Browse the repository at this point in the history
  • Loading branch information
louisewang1 committed Jan 4, 2022
1 parent 6640d9f commit c01b253
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api/category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
GET_CATEGORY_TYPES_ROUTE,
buildGetPublicItemCategoriesRoute,
buildGetCategoryRoute,
buildGetItemsByCategoriesRoute,
buildGetItemsInCategoryRoute,
} from './routes';

const axios = configureAxios();
Expand Down Expand Up @@ -49,7 +49,7 @@ export const buildGetItemsForCategoriesRoute = async (
{ API_HOST }: QueryClientConfig,
) =>
axios
.get(`${API_HOST}/${buildGetItemsByCategoriesRoute(categoryIds)}`)
.get(`${API_HOST}/${buildGetItemsInCategoryRoute(categoryIds)}`)
.then(({ data }) => data);

// payload: itemId, categoryId
Expand Down
2 changes: 1 addition & 1 deletion src/api/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export const buildGetItemCategoriesRoute = (id: UUID) =>
`${ITEMS_ROUTE}/${id}/categories`;
export const buildGetPublicItemCategoriesRoute = (id: UUID) =>
`${PUBLIC_PREFIX}/${ITEMS_ROUTE}/${id}/categories`;
export const buildGetItemsByCategoriesRoute = (ids: UUID[]) =>
export const buildGetItemsInCategoryRoute = (ids: UUID[]) =>
`${PUBLIC_PREFIX}/${ITEMS_ROUTE}/with-categories${qs.stringify(
{ categoryId: ids },
{ arrayFormat: 'repeat', addQueryPrefix: true },
Expand Down

0 comments on commit c01b253

Please sign in to comment.