roboto-js 1.4.7 → 1.4.9
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/cjs/rbt_api.cjs +7 -7
- package/dist/esm/rbt_api.js +7 -7
- package/package.json +1 -1
- package/src/rbt_api.js +7 -7
package/dist/cjs/rbt_api.cjs
CHANGED
|
@@ -203,28 +203,28 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
203
203
|
_context4.prev = 0;
|
|
204
204
|
debugger;
|
|
205
205
|
_context4.next = 4;
|
|
206
|
-
return this.post('/registerOrSigninOauth', userData);
|
|
206
|
+
return this.post('/api/account/registerOrSigninOauth', userData);
|
|
207
207
|
case 4:
|
|
208
208
|
response = _context4.sent;
|
|
209
|
-
if (!(response.
|
|
209
|
+
if (!(response.ok === false)) {
|
|
210
210
|
_context4.next = 7;
|
|
211
211
|
break;
|
|
212
212
|
}
|
|
213
213
|
return _context4.abrupt("return", this._handleError(response));
|
|
214
214
|
case 7:
|
|
215
|
-
this.iac_session = response
|
|
215
|
+
this.iac_session = response;
|
|
216
216
|
this.currentUser = this.iac_session ? new _rbt_user["default"](this.iac_session.user, this.axios) : null;
|
|
217
217
|
// update axios instance headers with authtoken
|
|
218
|
-
this.axios.defaults.headers.common['authtoken'] = response.
|
|
219
|
-
this.authtoken = response.
|
|
218
|
+
this.axios.defaults.headers.common['authtoken'] = response.authToken;
|
|
219
|
+
this.authtoken = response.authToken;
|
|
220
220
|
if (!this.localStorageAdaptor) {
|
|
221
221
|
_context4.next = 14;
|
|
222
222
|
break;
|
|
223
223
|
}
|
|
224
224
|
_context4.next = 14;
|
|
225
|
-
return this.localStorageAdaptor.setItem('authtoken', response.
|
|
225
|
+
return this.localStorageAdaptor.setItem('authtoken', response.authToken);
|
|
226
226
|
case 14:
|
|
227
|
-
return _context4.abrupt("return", response
|
|
227
|
+
return _context4.abrupt("return", response);
|
|
228
228
|
case 17:
|
|
229
229
|
_context4.prev = 17;
|
|
230
230
|
_context4.t0 = _context4["catch"](0);
|
package/dist/esm/rbt_api.js
CHANGED
|
@@ -96,19 +96,19 @@ export default class RbtApi {
|
|
|
96
96
|
async loginWithOauth(userData) {
|
|
97
97
|
try {
|
|
98
98
|
debugger;
|
|
99
|
-
const response = await this.post('/registerOrSigninOauth', userData);
|
|
100
|
-
if (response.
|
|
99
|
+
const response = await this.post('/api/account/registerOrSigninOauth', userData);
|
|
100
|
+
if (response.ok === false) {
|
|
101
101
|
return this._handleError(response);
|
|
102
102
|
}
|
|
103
|
-
this.iac_session = response
|
|
103
|
+
this.iac_session = response;
|
|
104
104
|
this.currentUser = this.iac_session ? new RbtUser(this.iac_session.user, this.axios) : null;
|
|
105
105
|
// update axios instance headers with authtoken
|
|
106
|
-
this.axios.defaults.headers.common['authtoken'] = response.
|
|
107
|
-
this.authtoken = response.
|
|
106
|
+
this.axios.defaults.headers.common['authtoken'] = response.authToken;
|
|
107
|
+
this.authtoken = response.authToken;
|
|
108
108
|
if (this.localStorageAdaptor) {
|
|
109
|
-
await this.localStorageAdaptor.setItem('authtoken', response.
|
|
109
|
+
await this.localStorageAdaptor.setItem('authtoken', response.authToken);
|
|
110
110
|
}
|
|
111
|
-
return response
|
|
111
|
+
return response;
|
|
112
112
|
} catch (e) {
|
|
113
113
|
this._handleError(e);
|
|
114
114
|
}
|
package/package.json
CHANGED
package/src/rbt_api.js
CHANGED
|
@@ -115,23 +115,23 @@ export default class RbtApi {
|
|
|
115
115
|
|
|
116
116
|
try {
|
|
117
117
|
debugger;
|
|
118
|
-
const response = await this.post('/registerOrSigninOauth', userData );
|
|
118
|
+
const response = await this.post('/api/account/registerOrSigninOauth', userData );
|
|
119
119
|
|
|
120
|
-
if (response.
|
|
120
|
+
if (response.ok === false) {
|
|
121
121
|
return this._handleError(response);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
this.iac_session = response
|
|
124
|
+
this.iac_session = response;
|
|
125
125
|
this.currentUser = (this.iac_session)? new RbtUser(this.iac_session.user, this.axios): null;
|
|
126
126
|
// update axios instance headers with authtoken
|
|
127
|
-
this.axios.defaults.headers.common['authtoken'] = response.
|
|
128
|
-
this.authtoken = response.
|
|
127
|
+
this.axios.defaults.headers.common['authtoken'] = response.authToken;
|
|
128
|
+
this.authtoken = response.authToken;
|
|
129
129
|
|
|
130
130
|
if(this.localStorageAdaptor){
|
|
131
|
-
await this.localStorageAdaptor.setItem('authtoken', response.
|
|
131
|
+
await this.localStorageAdaptor.setItem('authtoken', response.authToken);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
return response
|
|
134
|
+
return response;
|
|
135
135
|
|
|
136
136
|
} catch (e) {
|
|
137
137
|
|