feat: add update recording api
This commit is contained in:
@@ -19,6 +19,20 @@ export const getStoredRecordings = async (): Promise<string[] | null> => {
|
||||
}
|
||||
};
|
||||
|
||||
export const updateRecording = async (id: string, data: { name?: string; limit?: number }): Promise<boolean> => {
|
||||
try {
|
||||
const response = await axios.put(`${apiUrl}/storage/recordings/${id}`, data);
|
||||
if (response.status === 200) {
|
||||
return true;
|
||||
} else {
|
||||
throw new Error(`Couldn't update recording with id ${id}`);
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error(`Error updating recording: ${error.message}`);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
export const getStoredRuns = async (): Promise<string[] | null> => {
|
||||
try {
|
||||
const response = await axios.get(`${apiUrl}/storage/runs`);
|
||||
|
||||
Reference in New Issue
Block a user