ywana-core8 0.1.24 → 0.1.26
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.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +7 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +7 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/http/client.js +8 -4
- package/src/widgets/login/ResetPasswordBoxTest.js +1 -1
package/package.json
CHANGED
package/src/http/client.js
CHANGED
@@ -16,18 +16,22 @@ async function fetchAsync(method, URL, body = null, token, headers) {
|
|
16
16
|
if (headers) request.headers = request.headers
|
17
17
|
|
18
18
|
try {
|
19
|
+
|
19
20
|
var response = await fetch(URL, request);
|
20
21
|
if (response.ok) {
|
21
22
|
const json = await response.json();
|
22
23
|
return json
|
23
24
|
}
|
24
25
|
throw response
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
|
27
|
+
} catch (response) {
|
28
|
+
if (response instanceof Error) { throw { response } }
|
29
|
+
const json = await response.json()
|
28
30
|
throw {
|
29
31
|
success: false,
|
30
|
-
message: json.message || json.err
|
32
|
+
message: json.message || json.err,
|
33
|
+
status: response.status,
|
34
|
+
statusText: response.statusText,
|
31
35
|
}
|
32
36
|
}
|
33
37
|
}
|
@@ -21,7 +21,7 @@ export const ResetPasswordBoxTest = (prop) => {
|
|
21
21
|
return (
|
22
22
|
<ResetPasswordBox {...config} >
|
23
23
|
<div>
|
24
|
-
<
|
24
|
+
<h5>Your password must contain</h5>
|
25
25
|
<ul>
|
26
26
|
<li>At least 8 characters</li>
|
27
27
|
<li>At least one uppercase letter</li>
|