更新swagger
This commit is contained in:
@@ -30,9 +30,24 @@ class DeviceService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备详情
|
||||
* @param {number} deviceId 设备ID
|
||||
* @returns {Promise<Object>} 设备详情
|
||||
*/
|
||||
async getDevice(deviceId) {
|
||||
try {
|
||||
const response = await apiClient.devices.get(deviceId);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error('获取设备详情失败:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新设备信息
|
||||
* @param {string} deviceId 设备ID
|
||||
* @param {number} deviceId 设备ID
|
||||
* @param {Object} device 更新的设备信息
|
||||
* @returns {Promise<Object>} 更新后的设备信息
|
||||
*/
|
||||
@@ -48,7 +63,7 @@ class DeviceService {
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
* @param {string} deviceId 设备ID
|
||||
* @param {number} deviceId 设备ID
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async deleteDevice(deviceId) {
|
||||
|
||||
Reference in New Issue
Block a user