Spaces:
Running
Running
File size: 299 Bytes
5769f09 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import getSuggestion from "../extractors/suggestion.extractor.js";
export const getSuggestions = async (req) => {
const { keyword } = req.query;
try {
const data = await getSuggestion(encodeURIComponent(keyword));
return data;
} catch (e) {
console.error(e);
return e;
}
};
|