fix: 修复设备详情组合API返回undefined的问题
This commit is contained in:
@@ -20,40 +20,31 @@ export const detailDeviceApi = async (device: NdmDeviceResultVO, options?: { sta
|
||||
const deviceType = tryGetDeviceType(deviceTypeCode);
|
||||
if (!deviceType) throw new Error('未知的设备');
|
||||
if (deviceType === DEVICE_TYPE_LITERALS.ndmAlarmHost) {
|
||||
await detailAlarmHostApi(id, { stationCode, signal });
|
||||
return;
|
||||
return await detailAlarmHostApi(id, { stationCode, signal });
|
||||
}
|
||||
if (deviceType === DEVICE_TYPE_LITERALS.ndmCamera) {
|
||||
await detailCameraApi(id, { stationCode, signal });
|
||||
return;
|
||||
return await detailCameraApi(id, { stationCode, signal });
|
||||
}
|
||||
if (deviceType === DEVICE_TYPE_LITERALS.ndmDecoder) {
|
||||
await detailDecoderApi(id, { stationCode, signal });
|
||||
return;
|
||||
return await detailDecoderApi(id, { stationCode, signal });
|
||||
}
|
||||
if (deviceType === DEVICE_TYPE_LITERALS.ndmKeyboard) {
|
||||
await detailKeyboardApi(id, { stationCode, signal });
|
||||
return;
|
||||
return await detailKeyboardApi(id, { stationCode, signal });
|
||||
}
|
||||
if (deviceType === DEVICE_TYPE_LITERALS.ndmMediaServer) {
|
||||
await detailMediaServerApi(id, { stationCode, signal });
|
||||
return;
|
||||
return await detailMediaServerApi(id, { stationCode, signal });
|
||||
}
|
||||
if (deviceType === DEVICE_TYPE_LITERALS.ndmNvr) {
|
||||
await detailNvrApi(id, { stationCode, signal });
|
||||
return;
|
||||
return await detailNvrApi(id, { stationCode, signal });
|
||||
}
|
||||
if (deviceType === DEVICE_TYPE_LITERALS.ndmSecurityBox) {
|
||||
await detailSecurityBoxApi(id, { stationCode, signal });
|
||||
return;
|
||||
return await detailSecurityBoxApi(id, { stationCode, signal });
|
||||
}
|
||||
if (deviceType === DEVICE_TYPE_LITERALS.ndmSwitch) {
|
||||
await detailSwitchApi(id, { stationCode, signal });
|
||||
return;
|
||||
return await detailSwitchApi(id, { stationCode, signal });
|
||||
}
|
||||
if (deviceType === DEVICE_TYPE_LITERALS.ndmVideoServer) {
|
||||
await detailVideoServerApi(id, { stationCode, signal });
|
||||
return;
|
||||
return await detailVideoServerApi(id, { stationCode, signal });
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user