feat: use id
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user