curtain-web-api 1.0.8 → 1.0.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/build/classes/curtain-api.js +8 -4
- package/build/utilities.js +1 -1
- package/package.json +1 -1
- package/src/classes/curtain-api.ts +12 -4
- package/src/utilities.ts +1 -1
|
@@ -182,10 +182,14 @@ 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
|
-
this.user.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
this.user.clearDB().then(() => {
|
|
186
|
+
this.user.access_token = response.data.access;
|
|
187
|
+
this.user.refresh_token = response.data.refresh;
|
|
188
|
+
this.user.loginStatus = true;
|
|
189
|
+
this.user.saveIntoDB().then(() => {
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
;
|
|
189
193
|
return response;
|
|
190
194
|
}).then((response) => {
|
|
191
195
|
return this.getUserInfo();
|
package/build/utilities.js
CHANGED
|
@@ -62,7 +62,7 @@ function getInteractomeAtlas(genes, filterParameter = "None") {
|
|
|
62
62
|
for (const g of genes) {
|
|
63
63
|
searchTermArray.push("search_term_array%5B%5D=" + g);
|
|
64
64
|
}
|
|
65
|
-
return axios_1.default.get("
|
|
65
|
+
return axios_1.default.get("https://www.interactome-atlas.org/search_results_interactions?" + params.toString() + "&" + searchTermArray.join("&"), { responseType: "json" }).then((res) => {
|
|
66
66
|
return JSON.parse(res.data);
|
|
67
67
|
});
|
|
68
68
|
}
|
package/package.json
CHANGED
|
@@ -166,10 +166,18 @@ 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
|
-
this.user.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
this.user.clearDB().then(() => {
|
|
170
|
+
this.user.access_token = response.data.access;
|
|
171
|
+
this.user.refresh_token = response.data.refresh;
|
|
172
|
+
this.user.loginStatus = true;
|
|
173
|
+
this.user.saveIntoDB().then(
|
|
174
|
+
() => {
|
|
175
|
+
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
;
|
|
173
181
|
return response;
|
|
174
182
|
}).then((response) => {
|
|
175
183
|
return this.getUserInfo();
|
package/src/utilities.ts
CHANGED
|
@@ -52,7 +52,7 @@ export function getInteractomeAtlas(genes: string[], filterParameter: string ="N
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
return axios.get(
|
|
55
|
-
"
|
|
55
|
+
"https://www.interactome-atlas.org/search_results_interactions?" + params.toString() + "&" + searchTermArray.join("&"),
|
|
56
56
|
{responseType: "json"}
|
|
57
57
|
).then((res:any) => {
|
|
58
58
|
return JSON.parse(<string>res.data)
|