diff --git a/src/api/storage.ts b/src/api/storage.ts index ca4d975c..d2b28d5e 100644 --- a/src/api/storage.ts +++ b/src/api/storage.ts @@ -28,15 +28,24 @@ export const getStoredRecordings = async (): Promise => { } }; -export const createMarkdownRobot = async (url: string, name?: string): Promise => { +export const createScrapeRobot = async ( + url: string, + name?: string, + formats: string[] = ['markdown'] +): Promise => { try { - const response = await axios.post(`${apiUrl}/storage/recordings/markdown`, { - url, - name, - }, { - headers: { 'Content-Type': 'application/json' }, - withCredentials: true - }); + const response = await axios.post( + `${apiUrl}/storage/recordings/scrape`, + { + url, + name, + formats, + }, + { + headers: { 'Content-Type': 'application/json' }, + withCredentials: true, + } + ); if (response.status === 201) { return response.data;