@azteam/express 1.2.129 → 1.2.132

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/ApiServer.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/express",
3
- "version": "1.2.129",
3
+ "version": "1.2.132",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "repository": {
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@azteam/crypto": "1.0.17",
27
27
  "@azteam/error": "1.0.15",
28
- "@azteam/http-client": "1.0.80",
28
+ "@azteam/http-client": "1.0.82",
29
29
  "body-parser": "1.19.0",
30
30
  "cookie-parser": "1.4.4",
31
31
  "cors": "2.8.4",
package/src/ApiServer.js CHANGED
@@ -177,8 +177,10 @@ class ApiServer {
177
177
  res.success = function(data = {}, guard = [], allows = []) {
178
178
  let guardData = data;
179
179
  if (data) {
180
- let resType = RES_TYPE.ARRAY;
181
- if (_.isObject(data)) {
180
+ let resType = null;
181
+ if (_.isArray(data)) {
182
+ resType = RES_TYPE.ARRAY;
183
+ } else if (_.isObject(data)) {
182
184
  resType = RES_TYPE.OBJECT;
183
185
  if (data.docs) {
184
186
  resType = RES_TYPE.DOCS;