- Disabled camera settings form

- updated Config payload to update RSTP
This commit is contained in:
2025-10-13 13:04:09 +01:00
parent 44962e7d81
commit eca3e9783e
2 changed files with 18 additions and 9 deletions

View File

@@ -17,6 +17,7 @@ const fetchCameraSideConfig = async ({ queryKey }: { queryKey: string[] }) => {
const updateCamerasideConfig = async (data: {
id: string | number;
friendlyName: string;
cameraAddress: string;
}) => {
const updateUrl = `${base_url}/update-config?id=${data.id}`;
@@ -24,16 +25,17 @@ const updateCamerasideConfig = async (data: {
id: data.friendlyName,
fields: [
{
property: "id",
value: data.friendlyName,
property: "propURI",
value: data.cameraAddress,
},
],
};
console.log(updateConfigPayload);
const response = await fetch(updateUrl, {
method: "POST",
body: JSON.stringify(updateConfigPayload),
});
if (!response.ok) throw new Error("Cannot reach update camera endpoint");
if (!response.ok) throw new Error("Feature unavailable: Coming soon");
};
export const useFetchCameraConfig = (cameraSide: string) => {