@azteam/express 1.2.435 → 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 =
|
|
126
|
+
_context.next = 46;
|
|
127
127
|
break;
|
|
128
128
|
}
|
|
129
129
|
_client = new _httpClient["default"]({
|
|
@@ -139,14 +139,15 @@ function _default() {
|
|
|
139
139
|
});
|
|
140
140
|
case 42:
|
|
141
141
|
_response = _context.sent;
|
|
142
|
+
console.log(_response);
|
|
142
143
|
if (!_response.success) {
|
|
143
|
-
_context.next =
|
|
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
|
@@ -92,6 +92,9 @@ export default function (roles = null, minLevel = USER_LEVEL.USER, opts = {}) {
|
|
|
92
92
|
},
|
|
93
93
|
}),
|
|
94
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
|
}
|