更新swagger

This commit is contained in:
2025-09-19 23:56:30 +08:00
parent 23b6d236a5
commit 68e07a4d53
3 changed files with 103 additions and 13 deletions

View File

@@ -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) {