Skip to content

Commit

Permalink
fix: 식물 검색 API 쿼리 키 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
gihwan-dev committed Aug 30, 2024
1 parent 36032eb commit 45d79ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/apis/plantGuide/searchPlant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ export type SearchPlantResponse = {
}[];

export const searchPlant = async (query: string) => {
const response = await privateAxios.get<SearchPlantResponse>(`/plants?search=${query}`);
const response = await privateAxios.get<SearchPlantResponse>(`/plants?plantName=${query}`);
return response.data;
};
2 changes: 1 addition & 1 deletion src/mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const handlers = [
http.get(import.meta.env.VITE_API_URL + '/plants', async ({ request }) => {
await delay(1000);
const url = new URL(request.url);
const query = url.searchParams.get('search');
const query = url.searchParams.get('plantName');

if (!query) {
return HttpResponse.json([]);
Expand Down

0 comments on commit 45d79ad

Please sign in to comment.