fix: 移除updateVideoServerApi中不必要的id参数

This commit is contained in:
yangsy
2025-12-24 14:37:10 +08:00
parent b8c3878ece
commit d83968cfc4
2 changed files with 3 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ export const saveVideoServerApi = async (saveVO: NdmVideoServerSaveVO, options?:
return data;
};
export const updateVideoServerApi = async (id: string, updateVO: NdmVideoServerUpdateVO, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => {
export const updateVideoServerApi = async (updateVO: NdmVideoServerUpdateVO, options?: { stationCode?: Station['code']; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';

View File

@@ -93,10 +93,10 @@ const { mutate: updateDevice, isPending } = useMutation({
const stationCode = station.value.code;
const signal = abortController.value.signal;
if (deviceType === DEVICE_TYPE_LITERALS.ndmMediaServer) {
await updateMediaServerApi(localDevice.value as NdmMediaServerUpdateVO, { stationCode, signal });
await updateMediaServerApi(localDevice.value, { stationCode, signal });
return await detailMediaServerApi(`${localDevice.value.id}`, { stationCode, signal });
} else if (deviceType === DEVICE_TYPE_LITERALS.ndmVideoServer) {
await updateVideoServerApi(`${localDevice.value.id}`, localDevice.value as NdmVideoServerUpdateVO, { stationCode, signal });
await updateVideoServerApi(localDevice.value, { stationCode, signal });
return await detailVideoServerApi(`${localDevice.value.id}`, { stationCode, signal });
} else {
throw new Error('不是服务器设备');