quivr/frontend/lib/api/crawl/useCrawlApi.ts

14 lines
375 B
TypeScript
Raw Normal View History

import { useAxios } from "@/lib/hooks";
import { CrawlInputProps, crawlWebsiteUrl } from "./crawl";
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const useCrawlApi = () => {
const { axiosInstance } = useAxios();
return {
crawlWebsiteUrl: async (props: CrawlInputProps) =>
crawlWebsiteUrl(props, axiosInstance),
};
};