File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
frontend/src/widgets/Search/store Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 11import { Controller , Get , Query } from "@nestjs/common" ;
22import { SearchService } from "./search.service" ;
33
4- @Controller ( "search" )
4+ @Controller ( "api/ search" )
55export class SearchController {
66 constructor ( private readonly searchService : SearchService ) { }
77
Original file line number Diff line number Diff line change 11import { atom } from "jotai" ;
22import type { RefObject } from "react" ;
3- import { API_HOST } from "@/constants/constants" ;
43import type { SearchResult } from "../types" ;
4+ import { API_HOST } from "@/constants/constants" ;
55
66export const searchQueryAtom = atom ( "" ) ;
77export 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 } ,
You can’t perform that action at this time.
0 commit comments