xzwebx-httpfilter 2.1.8 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/HttpFilter.js +2 -7
  2. package/package.json +1 -1
package/HttpFilter.js CHANGED
@@ -14,7 +14,7 @@ async function response(req, res, next) {
14
14
  data: []
15
15
  }
16
16
  retData.codeKey = 'SUCC'
17
- return res.send(res.Msg(retData, req.GetRspMsgId()))
17
+ return res.send(res.Msg(retData, req.interfaceInfo.rspMsgId))
18
18
  }
19
19
  function SetIsCheckedRes(isCheckedRes) {
20
20
  if (isCheckedRes) {
@@ -125,12 +125,7 @@ function CheckReq(req, res, next) {
125
125
  return res.send(res.Msg({codeKey: 'CLT_ERR', msg: ['WEBX_ERR_URL']}))
126
126
  }
127
127
 
128
- req['__rspMsgId'] = ModuleInterfaceMap[module.id][subUri][req.method.toLowerCase()].rspMsgId || ''
129
- req['GetRspMsgId'] = function() {
130
- return req['__rspMsgId']
131
- }
132
-
133
- req.headers['interfaceInfo'] = ModuleInterfaceMap[module.id][subUri][req.method.toLowerCase()]
128
+ req['interfaceInfo'] = ModuleInterfaceMap[module.id][subUri][req.method.toLowerCase()]
134
129
  let reqMsgId = ModuleInterfaceMap[module.id][subUri][req.method.toLowerCase()].reqMsgId
135
130
  if (!reqMsgId) {
136
131
  return next()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xzwebx-httpfilter",
3
- "version": "2.1.8",
3
+ "version": "2.2.1",
4
4
  "main": "HttpFilter.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"