浏览代码

暴露警告信息接口

lrf402788946 3 年之前
父节点
当前提交
2a1fb34189
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 3 0
      app/controller/patent/.patentearly.js
  2. 1 0
      app/router/patent/patentearly.js

+ 3 - 0
app/controller/patent/.patentearly.js

@@ -38,4 +38,7 @@ module.exports = {
       count: true,
     },
   },
+  warning: {
+    service: "needWarning",
+  },
 };

+ 1 - 0
app/router/patent/patentearly.js

@@ -8,6 +8,7 @@ module.exports = app => {
   const index = 'patent';
   const target = 'patentearly';
   const metaTime = app.middleware.createTime();
+  router.post(target, `${profix}${vision}/${index}/${target}/warning`, controller[index][target].warning);
   router.get(target, `${profix}${vision}/${index}/${target}/queryByOrg`, metaTime, controller[index][target].queryByOrg);
   router.resources(target, `${profix}${vision}/${index}/${target}`, controller[index][target]); // index、create、show、destroy
   router.post(target, `${profix}${vision}/${index}/${target}/update/:id`, controller[index][target].update);