curtain-web-api 1.0.12 → 1.0.14
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.
|
@@ -35,4 +35,5 @@ export declare class CurtainWebAPI {
|
|
|
35
35
|
getDataFilterList(categoryName?: string, searchTerm?: string, limit?: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
36
36
|
deleteDataFilterList(id: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
37
37
|
downloadStats(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
38
|
+
postInteractomeAtlasProxy(data: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
38
39
|
}
|
|
@@ -182,22 +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
|
-
this.user.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
this.user.loginStatus = true;
|
|
190
|
-
this.user.updateDB().then();
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
this.user.access_token = response.data.access;
|
|
194
|
-
this.user.refresh_token = response.data.refresh;
|
|
195
|
-
this.user.loginStatus = true;
|
|
196
|
-
this.user.saveIntoDB().then(() => {
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
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);
|
|
201
189
|
}).then((response) => {
|
|
202
190
|
return this.getUserInfo();
|
|
203
191
|
});
|
|
@@ -368,5 +356,13 @@ class CurtainWebAPI {
|
|
|
368
356
|
return response;
|
|
369
357
|
});
|
|
370
358
|
}
|
|
359
|
+
postInteractomeAtlasProxy(data) {
|
|
360
|
+
let headers = new axios_1.AxiosHeaders();
|
|
361
|
+
headers["Accept"] = "application/json";
|
|
362
|
+
headers["Content-Type"] = "application/json";
|
|
363
|
+
return axios_1.default.post(this.baseURL + "interactome-atlas-proxy/", data, { headers: headers, responseType: "json" }).then((response) => {
|
|
364
|
+
return response;
|
|
365
|
+
});
|
|
366
|
+
}
|
|
371
367
|
}
|
|
372
368
|
exports.CurtainWebAPI = CurtainWebAPI;
|
package/package.json
CHANGED
|
@@ -166,29 +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
|
-
this.user.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
this.user.refresh_token = response.data.refresh;
|
|
174
|
-
this.user.loginStatus = true;
|
|
175
|
-
this.user.updateDB().then();
|
|
176
|
-
} else {
|
|
177
|
-
this.user.access_token = response.data.access;
|
|
178
|
-
this.user.refresh_token = response.data.refresh;
|
|
179
|
-
this.user.loginStatus = true;
|
|
180
|
-
this.user.saveIntoDB().then(
|
|
181
|
-
() => {
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
)
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
);
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
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)
|
|
192
173
|
}).then((response) => {
|
|
193
174
|
return this.getUserInfo();
|
|
194
175
|
});
|
|
@@ -382,5 +363,14 @@ export class CurtainWebAPI {
|
|
|
382
363
|
return response;
|
|
383
364
|
});
|
|
384
365
|
}
|
|
366
|
+
|
|
367
|
+
postInteractomeAtlasProxy(data: any) {
|
|
368
|
+
let headers = new AxiosHeaders();
|
|
369
|
+
headers["Accept"] = "application/json";
|
|
370
|
+
headers["Content-Type"] = "application/json";
|
|
371
|
+
return axios.post(this.baseURL + "interactome-atlas-proxy/", data, {headers: headers, responseType: "json"}).then((response) => {
|
|
372
|
+
return response;
|
|
373
|
+
});
|
|
374
|
+
}
|
|
385
375
|
}
|
|
386
376
|
|