@azteam/express 1.2.438 → 1.2.440
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/Server.js
CHANGED
|
@@ -225,6 +225,13 @@ var Server = /*#__PURE__*/function () {
|
|
|
225
225
|
}
|
|
226
226
|
return this.json(resData);
|
|
227
227
|
};
|
|
228
|
+
app.response.successWithMessage = function (message) {
|
|
229
|
+
var resData = {
|
|
230
|
+
success: true,
|
|
231
|
+
message: message
|
|
232
|
+
};
|
|
233
|
+
return this.json(resData);
|
|
234
|
+
};
|
|
228
235
|
app.response.cleanCookie = function (data) {
|
|
229
236
|
var _this2 = this;
|
|
230
237
|
_lodash["default"].map(data, function (name) {
|
|
@@ -127,6 +127,10 @@ function _default() {
|
|
|
127
127
|
req.query[_newKey] = _objectSpread(_objectSpread({}, req.query[_newKey]), {}, {
|
|
128
128
|
$lte: value
|
|
129
129
|
});
|
|
130
|
+
} else if (value.includes(',')) {
|
|
131
|
+
req.query[key] = {
|
|
132
|
+
$in: value.split(',')
|
|
133
|
+
};
|
|
130
134
|
}
|
|
131
135
|
if (!options.allowSearchFields.includes(key)) {
|
|
132
136
|
throw new _error.ErrorException(_error.INVALID, [{
|
package/package.json
CHANGED
package/src/Server.js
CHANGED
|
@@ -213,6 +213,14 @@ class Server {
|
|
|
213
213
|
return this.json(resData);
|
|
214
214
|
};
|
|
215
215
|
|
|
216
|
+
app.response.successWithMessage = function (message) {
|
|
217
|
+
const resData = {
|
|
218
|
+
success: true,
|
|
219
|
+
message,
|
|
220
|
+
};
|
|
221
|
+
return this.json(resData);
|
|
222
|
+
};
|
|
223
|
+
|
|
216
224
|
app.response.cleanCookie = function (data) {
|
|
217
225
|
_.map(data, (name) => {
|
|
218
226
|
this.clearCookie(name, {
|