mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-08 19:48:51 +01:00
feat: search working as expected
This commit is contained in:
parent
da42d6272a
commit
4197a92609
5 changed files with 60 additions and 51 deletions
|
|
@ -13,6 +13,13 @@ const postRequest = async (url, { arg }) => {
|
|||
return await axios.post(url, { withCredentials: true, arg });
|
||||
};
|
||||
|
||||
export const searchFetcher = async (pre, q, pageNumber, callback) => {
|
||||
pre();
|
||||
const { data } = await axios.get(`/api/search?q=${q}&pageNumber=${pageNumber}`);
|
||||
console.log('search data', data);
|
||||
callback(data);
|
||||
};
|
||||
|
||||
export const swr = (path, successCallback, options) => {
|
||||
const _options = { ...options };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue