@azteam/express 1.2.318 → 1.2.320
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 +1 -1
- package/lib/Server.js +2 -2
- package/package.json +1 -1
- package/src/AdminController.js +1 -0
- package/src/Server.js +2 -1
package/lib/AdminController.js
CHANGED
|
@@ -34,7 +34,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
34
34
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
35
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
36
36
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
|
-
var ALLOW_FIELDS = ['created_at', 'created_id', 'modified_at', 'modified_id', 'deleted_at', 'deleted_id', 'restored_id', 'resource', 'priority', 'is_processing'];
|
|
37
|
+
var ALLOW_FIELDS = ['created_at', 'created_id', 'modified_at', 'modified_id', 'deleted_at', 'deleted_id', 'restored_id', 'resource', 'priority', 'is_processing', 'is_synchronized'];
|
|
38
38
|
var AdminController = /*#__PURE__*/function (_Controller) {
|
|
39
39
|
_inherits(AdminController, _Controller);
|
|
40
40
|
var _super = _createSuper(AdminController);
|
package/lib/Server.js
CHANGED
|
@@ -200,7 +200,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
200
200
|
var guard = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
201
201
|
var allow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
202
202
|
var guardData = data;
|
|
203
|
-
if (data) {
|
|
203
|
+
if (allow !== '*' && data) {
|
|
204
204
|
var resType = null;
|
|
205
205
|
if (_lodash["default"].isArray(data)) {
|
|
206
206
|
resType = RES_TYPE.ARRAY;
|
|
@@ -213,7 +213,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
213
213
|
var responseGuard = guard;
|
|
214
214
|
var responseAllows = allow;
|
|
215
215
|
if (_lodash["default"].isArray(guard)) {
|
|
216
|
-
responseGuard = [].concat(_toConsumableArray(guard), ['__v', '_id', 'created_at', 'created_id', 'modified_at', 'modified_id', 'deleted_at', 'deleted_id', 'restored_id', 'resource', 'is_processing', 'priority']);
|
|
216
|
+
responseGuard = [].concat(_toConsumableArray(guard), ['__v', '_id', 'created_at', 'created_id', 'modified_at', 'modified_id', 'deleted_at', 'deleted_id', 'restored_id', 'resource', 'is_processing', 'is_synchronized', 'priority']);
|
|
217
217
|
}
|
|
218
218
|
if (resType === RES_TYPE.DOCS) {
|
|
219
219
|
guardData.docs = (0, _util.omitArrayItem)(data.docs, responseGuard, responseAllows);
|
package/package.json
CHANGED
package/src/AdminController.js
CHANGED
package/src/Server.js
CHANGED
|
@@ -164,7 +164,7 @@ class Server {
|
|
|
164
164
|
|
|
165
165
|
app.response.success = function (data = {}, guard = [], allow = []) {
|
|
166
166
|
let guardData = data;
|
|
167
|
-
if (data) {
|
|
167
|
+
if (allow !== '*' && data) {
|
|
168
168
|
let resType = null;
|
|
169
169
|
if (_.isArray(data)) {
|
|
170
170
|
resType = RES_TYPE.ARRAY;
|
|
@@ -196,6 +196,7 @@ class Server {
|
|
|
196
196
|
|
|
197
197
|
'resource',
|
|
198
198
|
'is_processing',
|
|
199
|
+
'is_synchronized',
|
|
199
200
|
'priority',
|
|
200
201
|
];
|
|
201
202
|
}
|