mas-server 3.0.3 → 3.0.4

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.
@@ -63,7 +63,7 @@ function createRouter(app, apiDir) {
63
63
  }
64
64
  catch (error) {
65
65
  console.log(error, error.toString);
66
- res.return({ msg: "服务器错误", error: ((_a = error === null || error === void 0 ? void 0 : error.toString) === null || _a === void 0 ? void 0 : _a.call(error)) || null }, 0);
66
+ res.return({ msg: "服务器错误", error: ((_a = error === null || error === void 0 ? void 0 : error.toString) === null || _a === void 0 ? void 0 : _a.call(error)) || null }, 0, 500);
67
67
  }
68
68
  }));
69
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-server",
3
- "version": "3.0.03",
3
+ "version": "3.0.04",
4
4
  "description": "一款基于express面向中小型项目的后端框架",
5
5
  "main": "dist/index.js",
6
6
  "typings": "src/index.ts",
@@ -24,7 +24,8 @@ export default function createRouter(app, apiDir: string) {
24
24
  console.log(error, error.toString);
25
25
  res.return(
26
26
  { msg: "服务器错误", error: error?.toString?.() || null },
27
- 0
27
+ 0,
28
+ 500
28
29
  );
29
30
  }
30
31
  });