| | |
| | | const result = await request.delete(url) |
| | | return result.data |
| | | } |
| | | |
| | | export const testUnBind = async function (device_sn: string): Promise<IWorkspaceResponse<any>> { |
| | | const url = `${HTTP_PREFIX}/devices/${device_sn}/unsubscribeTopic` |
| | | const result = await request.get(url) |
| | | return result.data |
| | | } |
| | | export const testBind = async function (device_sn: string): Promise<IWorkspaceResponse<any>> { |
| | | const url = `${HTTP_PREFIX}/devices/${device_sn}/subscribeTopic` |
| | | const result = await request.get(url) |
| | | return result.data |
| | | } |
| | | export const getDeviceBySn = async function (workspace_id: string, device_sn: string): Promise<IWorkspaceResponse<any>> { |
| | | const url = `${HTTP_PREFIX}/devices/${workspace_id}/devices/${device_sn}` |
| | | const result = await request.get(url) |