fix: 移除updateVideoServerApi中不必要的id参数
This commit is contained in:
@@ -42,7 +42,7 @@ export const saveVideoServerApi = async (saveVO: NdmVideoServerSaveVO, options?:
|
|||||||
return data;
|
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 { stationCode, signal } = options ?? {};
|
||||||
const client = stationCode ? ndmClient : userClient;
|
const client = stationCode ? ndmClient : userClient;
|
||||||
const prefix = stationCode ? `/${stationCode}` : '';
|
const prefix = stationCode ? `/${stationCode}` : '';
|
||||||
|
|||||||
@@ -93,10 +93,10 @@ const { mutate: updateDevice, isPending } = useMutation({
|
|||||||
const stationCode = station.value.code;
|
const stationCode = station.value.code;
|
||||||
const signal = abortController.value.signal;
|
const signal = abortController.value.signal;
|
||||||
if (deviceType === DEVICE_TYPE_LITERALS.ndmMediaServer) {
|
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 });
|
return await detailMediaServerApi(`${localDevice.value.id}`, { stationCode, signal });
|
||||||
} else if (deviceType === DEVICE_TYPE_LITERALS.ndmVideoServer) {
|
} 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 });
|
return await detailVideoServerApi(`${localDevice.value.id}`, { stationCode, signal });
|
||||||
} else {
|
} else {
|
||||||
throw new Error('不是服务器设备');
|
throw new Error('不是服务器设备');
|
||||||
|
|||||||
Reference in New Issue
Block a user