tradly 1.2.8 → 1.2.10
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/Constants/PathConstant.js +1 -0
- package/Roots/App.js +1 -0
- package/Roots/User.js +22 -0
- package/package.json +1 -1
|
@@ -21,6 +21,7 @@ export const REGISTER = "/v1/users/register";
|
|
|
21
21
|
export const VERIFY = "/v1/users/verify";
|
|
22
22
|
export const FORGOTPASSWORD = "/v1/users/password/recovery";
|
|
23
23
|
export const SETPASSWORD = "/v1/users/password/set";
|
|
24
|
+
export const RESETPASSWORD = "/v1/users/password/change";
|
|
24
25
|
|
|
25
26
|
export const USERS = "/v1/users";
|
|
26
27
|
export const DEVICES = "/v1/devices";
|
package/Roots/App.js
CHANGED
package/Roots/User.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
LOGIN,
|
|
5
5
|
LOGOUT,
|
|
6
6
|
REGISTER,
|
|
7
|
+
RESETPASSWORD,
|
|
7
8
|
SETPASSWORD,
|
|
8
9
|
SOCIAL_LOGIN,
|
|
9
10
|
VERIFY,
|
|
@@ -136,6 +137,27 @@ class User {
|
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
139
|
|
|
140
|
+
async resetPassword(param = UserParameter) {
|
|
141
|
+
try {
|
|
142
|
+
const [error, responseJson] = await network.networkCall({
|
|
143
|
+
path: RESETPASSWORD,
|
|
144
|
+
method: Method.POST,
|
|
145
|
+
param: param.data,
|
|
146
|
+
currency: param.currency,
|
|
147
|
+
language: param.language,
|
|
148
|
+
pkKey: param.pkKey,
|
|
149
|
+
authKey: param.authKey,
|
|
150
|
+
});
|
|
151
|
+
if (error) {
|
|
152
|
+
return error;
|
|
153
|
+
} else {
|
|
154
|
+
return responseJson;
|
|
155
|
+
}
|
|
156
|
+
} catch (error) {
|
|
157
|
+
return error;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
139
161
|
async logout(param = { data }) {
|
|
140
162
|
try {
|
|
141
163
|
const [error, responseJson] = await network.networkCall({
|