feat: use id

This commit is contained in:
karishmas6
2024-10-10 03:48:10 +05:30
parent cba7f29049
commit 5d90716413

View File

@@ -60,13 +60,13 @@ export const deleteRunFromStorage = async (id: string): Promise<boolean> => {
} }
}; };
export const editRecordingFromStorage = async (browserId: string, robotId: string): Promise<WorkflowFile | null> => { export const editRecordingFromStorage = async (browserId: string, id: string): Promise<WorkflowFile | null> => {
try { try {
const response = await axios.put(`http://localhost:8080/workflow/${browserId}/${robotId}`); const response = await axios.put(`http://localhost:8080/workflow/${browserId}/${id}`);
if (response.status === 200) { if (response.status === 200) {
return response.data; return response.data;
} else { } else {
throw new Error(`Couldn't edit stored recording ${robotId}`); throw new Error(`Couldn't edit stored recording ${id}`);
} }
} catch(error: any) { } catch(error: any) {
console.log(error); console.log(error);