@betterstore/sdk 0.7.2 → 0.7.3

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/index.js CHANGED
@@ -44,11 +44,13 @@ var BaseClient = class {
44
44
  if (val !== void 0) searchParams.set(key, val);
45
45
  });
46
46
  }
47
- console.log(`${url}?${searchParams.toString()}`);
48
- const res = await fetch(`${url}?${searchParams.toString()}`, {
49
- method: "GET",
50
- headers: this.headers
51
- });
47
+ const res = await fetch(
48
+ `${url}${searchParams.size > 0 ? `?${searchParams.toString()}` : ""}`,
49
+ {
50
+ method: "GET",
51
+ headers: this.headers
52
+ }
53
+ );
52
54
  return this.handleResponse(res);
53
55
  }
54
56
  async post(path, body) {
package/dist/index.mjs CHANGED
@@ -17,11 +17,13 @@ var BaseClient = class {
17
17
  if (val !== void 0) searchParams.set(key, val);
18
18
  });
19
19
  }
20
- console.log(`${url}?${searchParams.toString()}`);
21
- const res = await fetch(`${url}?${searchParams.toString()}`, {
22
- method: "GET",
23
- headers: this.headers
24
- });
20
+ const res = await fetch(
21
+ `${url}${searchParams.size > 0 ? `?${searchParams.toString()}` : ""}`,
22
+ {
23
+ method: "GET",
24
+ headers: this.headers
25
+ }
26
+ );
25
27
  return this.handleResponse(res);
26
28
  }
27
29
  async post(path, body) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",