@azteam/express 1.2.330 → 1.2.332
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.
package/lib/AdminController.js
CHANGED
|
@@ -153,7 +153,7 @@ var AdminController = /*#__PURE__*/function (_Controller) {
|
|
|
153
153
|
while (1) {
|
|
154
154
|
switch (_context5.prev = _context5.next) {
|
|
155
155
|
case 0:
|
|
156
|
-
return _context5.abrupt("return", _this.repository.createByUser(user.id, data));
|
|
156
|
+
return _context5.abrupt("return", _this.repository.createByUser(user.id, data, ['email', 'password', 'slug']));
|
|
157
157
|
case 1:
|
|
158
158
|
case "end":
|
|
159
159
|
return _context5.stop();
|
|
@@ -23,7 +23,7 @@ function _default(secretKey) {
|
|
|
23
23
|
_context.next = 2;
|
|
24
24
|
break;
|
|
25
25
|
}
|
|
26
|
-
throw new _error.ErrorException(_error.MISSING_PARAM);
|
|
26
|
+
throw new _error.ErrorException(_error.MISSING_PARAM, "field captcha is missing");
|
|
27
27
|
case 2:
|
|
28
28
|
client = new _httpClient["default"]();
|
|
29
29
|
_context.next = 5;
|
package/package.json
CHANGED
package/src/AdminController.js
CHANGED
|
@@ -118,7 +118,7 @@ class AdminController extends Controller {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
methodPostCreate = async (data, user) => {
|
|
121
|
-
return this.repository.createByUser(user.id, data);
|
|
121
|
+
return this.repository.createByUser(user.id, data, ['email', 'password', 'slug']);
|
|
122
122
|
};
|
|
123
123
|
|
|
124
124
|
postCreate() {
|
|
@@ -4,7 +4,7 @@ import {ErrorException, MISSING_PARAM, RECAPTCHA} from '@azteam/error';
|
|
|
4
4
|
export default function (secretKey) {
|
|
5
5
|
return async function (req, res, next) {
|
|
6
6
|
if (!req.body.captcha) {
|
|
7
|
-
throw new ErrorException(MISSING_PARAM);
|
|
7
|
+
throw new ErrorException(MISSING_PARAM, `field captcha is missing`);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const client = new HttpClient();
|