You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const device = require('../../controllers/device/index');
|
|
|
|
|
|
|
|
module.exports = function (app, router, opts, AuthCode) {
|
|
|
|
|
|
|
|
app.fs.api.logAttr['POST/device'] = { content: '增加设备信息', visible: true };
|
|
|
|
router.post('/device', device.addDevice(opts))
|
|
|
|
|
|
|
|
// 修改设备信息
|
|
|
|
app.fs.api.logAttr['PUT/device/:id'] = { content: '修改设备信息', visible: true };
|
|
|
|
router.put('/device/:id', device.editDevice(opts))
|
|
|
|
|
|
|
|
// 删除设备信息
|
|
|
|
app.fs.api.logAttr['DEL/device/:id'] = { content: '删除设备信息', visible: true };
|
|
|
|
router.del('/device/:id', device.deleteDevice(opts))
|
|
|
|
|
|
|
|
// 获取设备信息列表
|
|
|
|
app.fs.api.logAttr['GET/device'] = { content: '获取设备信息列表', visible: true };
|
|
|
|
router.get('/device', device.getDeviceList(opts));
|
|
|
|
|
|
|
|
// 获取设备信息
|
|
|
|
app.fs.api.logAttr['GET/devices'] = { content: '获取设备信息', visible: true };
|
|
|
|
router.get('/devices', device.getDevices(opts));
|
|
|
|
|
|
|
|
};
|