Skip to content

Commit 0c39b34

Browse files
committed
feat: Backend 서버의 api uri 를 /search? 에서 /api/search 로 변경
1 parent 13a41d9 commit 0c39b34

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backend/src/search/search.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Controller, Get, Query } from "@nestjs/common";
22
import { SearchService } from "./search.service";
33

4-
@Controller("search")
4+
@Controller("api/search")
55
export class SearchController {
66
constructor(private readonly searchService: SearchService) {}
77

frontend/src/widgets/Search/store/search.atom.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { atom } from "jotai";
22
import type { RefObject } from "react";
3-
import { API_HOST } from "@/constants/constants";
43
import type { SearchResult } from "../types";
4+
import { API_HOST } from "@/constants/constants";
55

66
export const searchQueryAtom = atom("");
77
export const searchResultsAtom = atom<SearchResult[]>([]);
@@ -55,7 +55,7 @@ export const searchActionAtom = atom(
5555
const currentController = abortController.current;
5656
try {
5757
const res = await fetch(
58-
`/api/search?query=${encodeURIComponent(query)}`,
58+
`${API_HOST}/api/search?query=${encodeURIComponent(query)}`,
5959
{
6060
signal: currentController.signal,
6161
},

0 commit comments

Comments
 (0)