feat: add credentials param for update recording
This commit is contained in:
@@ -5,6 +5,10 @@ import { ScheduleSettings } from "../components/robot/ScheduleSettings";
|
|||||||
import { CreateRunResponse, ScheduleRunResponse } from "../pages/MainPage";
|
import { CreateRunResponse, ScheduleRunResponse } from "../pages/MainPage";
|
||||||
import { apiUrl } from "../apiConfig";
|
import { apiUrl } from "../apiConfig";
|
||||||
|
|
||||||
|
interface Credentials {
|
||||||
|
[key: string]: string;
|
||||||
|
}
|
||||||
|
|
||||||
export const getStoredRecordings = async (): Promise<string[] | null> => {
|
export const getStoredRecordings = async (): Promise<string[] | null> => {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(`${apiUrl}/storage/recordings`);
|
const response = await axios.get(`${apiUrl}/storage/recordings`);
|
||||||
@@ -19,7 +23,7 @@ export const getStoredRecordings = async (): Promise<string[] | null> => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const updateRecording = async (id: string, data: { name?: string; limit?: number }): Promise<boolean> => {
|
export const updateRecording = async (id: string, data: { name?: string; limit?: number, credentials?: Credentials }): Promise<boolean> => {
|
||||||
try {
|
try {
|
||||||
const response = await axios.put(`${apiUrl}/storage/recordings/${id}`, data);
|
const response = await axios.put(`${apiUrl}/storage/recordings/${id}`, data);
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
|
|||||||
Reference in New Issue
Block a user