Browse Source

(*)代码走查后修改路由规范

master
Archer_cdm 2 years ago
parent
commit
dced87f34c
  1. 2
      api/app/lib/controllers/report/index.js
  2. 4
      api/app/lib/routes/report/index.js

2
api/app/lib/controllers/report/index.js

@ -2,7 +2,7 @@
// 查询储备项目统计表
async function getReserveItemReport(ctx, next) {
const { type } = ctx.request.query;
const { type } = ctx.params;
let rslt = null;
try {
rslt = await ctx.fs.dc.models.ReserveItemReport.findAll({

4
api/app/lib/routes/report/index.js

@ -3,6 +3,6 @@
const report = require('../../controllers/report');
module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/getReserveItemReport'] = { content: '查询储备项目统计表', visible: false };
router.get('/getReserveItemReport', report.getReserveItemReport);
app.fs.api.logAttr['GET/reserveItem/report/:type'] = { content: '查询储备项目统计表', visible: false };
router.get('/reserveItem/report/:type', report.getReserveItemReport);
};
Loading…
Cancel
Save