mirror of
https://github.com/JustAnimeCore/JustAnime.git
synced 2026-04-18 06:11:45 +00:00
17 lines
397 B
JavaScript
17 lines
397 B
JavaScript
import axios from "axios";
|
|
|
|
const getSearchSuggestion = async (keyword) => {
|
|
const api_url = import.meta.env.VITE_API_URL;
|
|
try {
|
|
const response = await axios.get(
|
|
`${api_url}/search/suggest?keyword=${keyword}`
|
|
);
|
|
return response.data.results;
|
|
} catch (err) {
|
|
console.error("Error fetching genre info:", err);
|
|
return err;
|
|
}
|
|
};
|
|
|
|
export default getSearchSuggestion;
|