eddev 0.2.19 → 0.2.20

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.
@@ -53,6 +53,7 @@ var react_2 = require("react");
53
53
  var react_3 = require("react");
54
54
  var reducer = function (state, action) {
55
55
  var _a, _b, _c;
56
+ console.log("Dispatch", state, action);
56
57
  switch (action.type) {
57
58
  case "field":
58
59
  return __assign(__assign({}, state), { errors: __assign(__assign({}, state.errors), (_a = {}, _a[action.id] = undefined, _a)), values: __assign(__assign({}, state.values), (_b = {}, _b[action.id] = action.value, _b)) });
@@ -98,6 +99,7 @@ function useGravityForm(opts) {
98
99
  submit(form, state).then(function (result) {
99
100
  if (cancelled)
100
101
  return;
102
+ console.log("Submitted", result);
101
103
  if (result.success) {
102
104
  dispatch({ type: "success", message: result.successMessage || "" });
103
105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eddev",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "main": "./index.js",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -4,7 +4,7 @@ import { fetchWP } from "../../../_utils/fetch-wp"
4
4
  const validProxyPaths = {
5
5
  "form-submit": {
6
6
  path: "/wp-json/ed/v1/gf/submit",
7
- method: "GET",
7
+ method: "POST",
8
8
  },
9
9
  query: {
10
10
  path: "/wp-json/ed/v1/query/*",
@@ -35,6 +35,7 @@ export default async function (req: NextApiRequest, res: NextApiResponse) {
35
35
  headers: {
36
36
  "Content-Type": "application/json",
37
37
  },
38
+ body: proxyPath.method === "POST" ? JSON.stringify(req.body) : undefined,
38
39
  },
39
40
  async (response) => ({
40
41
  payload: await response.json(),