@azteam/express 1.2.434 → 1.2.436

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.
@@ -123,7 +123,7 @@ function _default() {
123
123
  return _context.abrupt("return", next());
124
124
  case 38:
125
125
  if (!(req.user.level >= minLevel)) {
126
- _context.next = 45;
126
+ _context.next = 46;
127
127
  break;
128
128
  }
129
129
  _client = new _httpClient["default"]({
@@ -135,18 +135,19 @@ function _default() {
135
135
  });
136
136
  _context.next = 42;
137
137
  return _client.post("".concat(systemURL, "/v1/user_positions/is_permission"), {
138
- roles: roles
138
+ roles: JSON.stringify(roles)
139
139
  });
140
140
  case 42:
141
141
  _response = _context.sent;
142
+ console.log(_response);
142
143
  if (!_response.success) {
143
- _context.next = 45;
144
+ _context.next = 46;
144
145
  break;
145
146
  }
146
147
  return _context.abrupt("return", next());
147
- case 45:
148
- throw new _error.ErrorException(_error.PERMISSION);
149
148
  case 46:
149
+ throw new _error.ErrorException(_error.PERMISSION);
150
+ case 47:
150
151
  case "end":
151
152
  return _context.stop();
152
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/express",
3
- "version": "1.2.434",
3
+ "version": "1.2.436",
4
4
  "license": "MIT",
5
5
  "author": "toda <sp.azsolution.net@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -91,7 +91,10 @@ export default function (roles = null, minLevel = USER_LEVEL.USER, opts = {}) {
91
91
  Authorization: headers.authorization,
92
92
  },
93
93
  }),
94
- response = await client.post(`${systemURL}/v1/user_positions/is_permission`, {roles});
94
+ response = await client.post(`${systemURL}/v1/user_positions/is_permission`, {roles: JSON.stringify(roles)});
95
+
96
+ console.log(response);
97
+
95
98
  if (response.success) {
96
99
  return next();
97
100
  }