@qite/tide-client 1.0.74 → 1.0.75

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-client",
3
- "version": "1.0.74",
3
+ "version": "1.0.75",
4
4
  "description": "Frontend client for Tide",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -12,8 +12,8 @@ export const post = async <T>(
12
12
  const responseBody = await response.text();
13
13
 
14
14
  const result: T = skipReviver
15
- ? JSON.parse(responseBody)
16
- : JSON.parse(responseBody, reviver);
15
+ ? JSON.parse(responseBody ?? "")
16
+ : JSON.parse(responseBody ?? "", reviver);
17
17
  return result;
18
18
  };
19
19
 
@@ -7,6 +7,7 @@ import {
7
7
  MemberResetPasswordRequest,
8
8
  } from "../types";
9
9
  import { post } from "./common-client";
10
+ import { post as apiPost } from "./api";
10
11
 
11
12
  const ENDPOINT = "/api/member";
12
13
  const ENDPOINT_LOGIN = `${ENDPOINT}/login`;
@@ -35,7 +36,7 @@ export const logout = (
35
36
  const apiKey = config.apiKey;
36
37
  const body = "";
37
38
 
38
- return post(url, apiKey, body, signal);
39
+ return apiPost(url, apiKey, body, signal);
39
40
  };
40
41
 
41
42
  export const confirm = (
@@ -47,7 +48,7 @@ export const confirm = (
47
48
  const apiKey = config.apiKey;
48
49
  const body = JSON.stringify(request);
49
50
 
50
- return post(url, apiKey, body, signal);
51
+ return apiPost(url, apiKey, body, signal);
51
52
  };
52
53
 
53
54
  export const forgotPassword = (
@@ -59,7 +60,7 @@ export const forgotPassword = (
59
60
  const apiKey = config.apiKey;
60
61
  const body = JSON.stringify(request);
61
62
 
62
- return post(url, apiKey, body, signal);
63
+ return apiPost(url, apiKey, body, signal);
63
64
  };
64
65
 
65
66
  export const resetPassword = (
@@ -71,5 +72,5 @@ export const resetPassword = (
71
72
  const apiKey = config.apiKey;
72
73
  const body = JSON.stringify(request);
73
74
 
74
- return post(url, apiKey, body, signal);
75
+ return apiPost(url, apiKey, body, signal);
75
76
  };