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 +7 -1
- package/dist/apiConnector.js +1 -1
- package/dist/test.js +1 -0
- package/package.json +1 -1
- package/src/GGApi.ts +9 -6
- package/src/apiConnector.ts +2 -2
- package/src/test.ts +1 -0
package/dist/GGApi.js
CHANGED
|
@@ -73,7 +73,13 @@ function run() {
|
|
|
73
73
|
// parameter: { lotNumber: 1223 },
|
|
74
74
|
// data: [],
|
|
75
75
|
// })
|
|
76
|
-
const data2 =
|
|
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
|
});
|
package/dist/apiConnector.js
CHANGED
package/dist/test.js
CHANGED
package/package.json
CHANGED
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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()
|
package/src/apiConnector.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
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
|
})
|