curtain-web-api 1.0.11 → 1.0.13
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.
|
@@ -182,20 +182,10 @@ class CurtainWebAPI {
|
|
|
182
182
|
headers["Accept"] = "application/json";
|
|
183
183
|
headers["Content-Type"] = "application/json";
|
|
184
184
|
return this.axiosInstance.post(this.orcidLoginURL, JSON.stringify({ "auth_token": authorizationCode, "redirect_uri": redirectURI }), { headers: headers, responseType: "json" }).then((response) => {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
this.user.updateDB().then();
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
this.user.access_token = response.data.access;
|
|
193
|
-
this.user.refresh_token = response.data.refresh;
|
|
194
|
-
this.user.loginStatus = true;
|
|
195
|
-
this.user.saveIntoDB().then(() => {
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
return response;
|
|
185
|
+
this.user.access_token = response.data.access;
|
|
186
|
+
this.user.refresh_token = response.data.refresh;
|
|
187
|
+
this.user.loginStatus = true;
|
|
188
|
+
console.log(this.user);
|
|
199
189
|
}).then((response) => {
|
|
200
190
|
return this.getUserInfo();
|
|
201
191
|
});
|
package/package.json
CHANGED
|
@@ -166,24 +166,10 @@ export class CurtainWebAPI {
|
|
|
166
166
|
headers["Accept"] = "application/json";
|
|
167
167
|
headers["Content-Type"] = "application/json";
|
|
168
168
|
return this.axiosInstance.post(this.orcidLoginURL, JSON.stringify({"auth_token": authorizationCode, "redirect_uri": redirectURI}), {headers: headers, responseType:"json"}).then((response) => {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
this.user.updateDB().then();
|
|
174
|
-
} else {
|
|
175
|
-
this.user.access_token = response.data.access;
|
|
176
|
-
this.user.refresh_token = response.data.refresh;
|
|
177
|
-
this.user.loginStatus = true;
|
|
178
|
-
this.user.saveIntoDB().then(
|
|
179
|
-
() => {
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
)
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
return response;
|
|
169
|
+
this.user.access_token = response.data.access;
|
|
170
|
+
this.user.refresh_token = response.data.refresh;
|
|
171
|
+
this.user.loginStatus = true;
|
|
172
|
+
console.log(this.user)
|
|
187
173
|
}).then((response) => {
|
|
188
174
|
return this.getUserInfo();
|
|
189
175
|
});
|