'use strict'; const firmwareUpgrade = require('../../controllers/firmwareUpgrade'); module.exports = function (app, router, opts) { app.fs.api.logAttr['GET/deviceType'] = { content: '获取设备型号', visible: true } router.get('/deviceType', firmwareUpgrade.getDeviceType) app.fs.api.logAttr['GET/structure'] = { content: '获取结构物相关', visible: true } router.get('/structure', firmwareUpgrade.getStruc) app.fs.api.logAttr['GET/firmware'] = { content: '获取固件包列表', visible: true } router.get('/firmware', firmwareUpgrade.getFirmwares) // app.fs.api.logAttr['POST/upgradeFirmware'] = { content: '增加/覆盖固件包', visible: true } // router.post('/upgradeFirmware', firmwareUpgrade.firmwareUpgrades) app.fs.api.logAttr['DELETE/deleteFirmware'] = { content: '删除固件包', visible: true } router.delete('/deleteFirmware', firmwareUpgrade.deleteFirmware) app.fs.api.logAttr['GET/getThingMessages'] = { content: '获取设备信息', visible: true } router.get('/getThingMessages', firmwareUpgrade.getThingMessages) app.fs.api.logAttr['POST/distributeConfiguration'] = { content: '下发配置(单个或批量)', visible: true } router.post('/distributeConfiguration', firmwareUpgrade.distributeConfiguration) }