'use strict'; const backups = require('../../controllers/backups/index'); module.exports = function (app, router, opts, AuthCode) { app.fs.api.logAttr['POST/meta/backups'] = { content: '增加数据备份', visible: true }; router.post('/meta/backups', backups.addBackups(opts)) // 修改数据备份信息 app.fs.api.logAttr['PUT/meta/backups/:id'] = { content: '修改数据备份信息', visible: true }; router.put('/meta/backups/:id', backups.editBackups(opts)) // 删除数据备份信息 app.fs.api.logAttr['DEL/meta/backups/:id'] = { content: '删除数据备份信息', visible: true }; router.del('/meta/backups/:id', backups.deleteBackups(opts)) //获取数据备份信息列表 app.fs.api.logAttr['GET/meta/backups'] = { content: '获取数据备份信息列表', visible: true }; router.get('/meta/backups', backups.getBackupsList(opts)); //恢复备份 app.fs.api.logAttr['POST/backups/restore'] = { content: '恢复备份', visible: true }; router.post('/backups/restore', backups.restore(opts)) };