gg-express 1.0.31 → 1.0.35

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/dist/GGApi.js CHANGED
@@ -73,7 +73,13 @@ function run() {
73
73
  // parameter: { lotNumber: 1223 },
74
74
  // data: [],
75
75
  // })
76
- const data2 = yield api.get(("http://localhost:3002" + "/api/users/id"), {
76
+ // const data2 = await api.get(
77
+ // ("http://localhost:3002" + "/api/users/id") as any,
78
+ // {
79
+ // data: [{ id: 2 }, { id: 3 }, { id: 20 }],
80
+ // }
81
+ // )
82
+ const data2 = yield api.get("/api/users/id", {
77
83
  data: [{ id: 2 }, { id: 3 }, { id: 20 }],
78
84
  });
79
85
  });
@@ -10,7 +10,7 @@ class GGApi {
10
10
  get(url, requireParams) {
11
11
  return new Promise((resolve, reject) => {
12
12
  axios_1.default
13
- .get(url, { params: requireParams })
13
+ .get(url, { params: { data: requireParams } })
14
14
  .then((response) => {
15
15
  resolve(response.data);
16
16
  })
package/dist/test.js CHANGED
@@ -23,6 +23,7 @@ function run() {
23
23
  },
24
24
  },
25
25
  }, (req, res, next) => {
26
+ req.query.data.data;
26
27
  console.log(req.query);
27
28
  return res.json({
28
29
  message: "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gg-express",
3
- "version": "1.0.31",
3
+ "version": "1.0.35",
4
4
  "description": "",
5
5
  "main": "dist/GGExpress.js",
6
6
  "scripts": {
package/src/GGApi.ts CHANGED
@@ -74,11 +74,14 @@ async function run() {
74
74
  // data: [],
75
75
  // })
76
76
 
77
- const data2 = await api.get(
78
- ("http://localhost:3002" + "/api/users/id") as any,
79
- {
80
- data: [{ id: 2 }, { id: 3 }, { id: 20 }],
81
- }
82
- )
77
+ // const data2 = await api.get(
78
+ // ("http://localhost:3002" + "/api/users/id") as any,
79
+ // {
80
+ // data: [{ id: 2 }, { id: 3 }, { id: 20 }],
81
+ // }
82
+ // )
83
+ const data2 = await api.get("/api/users/id", {
84
+ data: [{ id: 2 }, { id: 3 }, { id: 20 }],
85
+ })
83
86
  }
84
87
  run()
@@ -1,5 +1,5 @@
1
1
 
2
- import axios from "axios"
2
+ import axios from "axios"
3
3
  import { staticRouteInterface } from "./staticRouteInterface"
4
4
 
5
5
  export class GGApi {
@@ -11,7 +11,7 @@ export class GGApi {
11
11
  ): Promise<staticRouteInterface["get"][T]["responseStructure"]> {
12
12
  return new Promise((resolve, reject) => {
13
13
  axios
14
- .get(url as string, { params: requireParams })
14
+ .get(url as string, { params: { data: requireParams } })
15
15
  .then((response) => {
16
16
  resolve(response.data)
17
17
  })
package/src/test.ts CHANGED
@@ -21,6 +21,7 @@ function run() {
21
21
  },
22
22
  },
23
23
  (req, res, next) => {
24
+ req.query.data.data
24
25
  console.log(req.query)
25
26
  return res.json({
26
27
  message: "",