badmfck-api-server 1.6.6 → 1.6.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -143,6 +143,12 @@ class APIService extends BaseService_1.BaseService {
143
143
  if (this.options.onNetworkLog && log)
144
144
  this.options.onNetworkLog(log);
145
145
  const execute = async () => {
146
+ const body = req.body;
147
+ if (req.query && typeof req.query === "object") {
148
+ for (let i in req.query) {
149
+ body[i] = req.query[i];
150
+ }
151
+ }
146
152
  const httpRequest = {
147
153
  raw: req,
148
154
  method: req.method,
@@ -150,7 +156,6 @@ class APIService extends BaseService_1.BaseService {
150
156
  params: req.params,
151
157
  headers: req.headers,
152
158
  endpoint: ep,
153
- query: req.query
154
159
  };
155
160
  let result;
156
161
  try {
@@ -15,7 +15,6 @@ export interface HTTPRequestVO {
15
15
  raw: any;
16
16
  method: string;
17
17
  data: any;
18
- query: any;
19
18
  params: {
20
19
  [key: string]: string;
21
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",