ichec-angular-core 0.2.2 → 0.2.4
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.
|
@@ -194,7 +194,6 @@ class RestService {
|
|
|
194
194
|
if (query.filter) {
|
|
195
195
|
params.set('search', query.filter);
|
|
196
196
|
}
|
|
197
|
-
console.log(params);
|
|
198
197
|
return this._http.get(this.getBaseUrl(), {
|
|
199
198
|
headers: this.getHeaders(),
|
|
200
199
|
credentials: this.config.allow_cross_origin ? 'include' : 'same-origin',
|
|
@@ -202,13 +201,12 @@ class RestService {
|
|
|
202
201
|
}).pipe(tap(response => console.log(response)), catchError(this.handleError));
|
|
203
202
|
}
|
|
204
203
|
getItem(id) {
|
|
205
|
-
return this._http.get(this.getBaseUrl() + id, {
|
|
204
|
+
return this._http.get(this.getBaseUrl() + id + "/", {
|
|
206
205
|
headers: this.getHeaders(),
|
|
207
206
|
credentials: this.config.allow_cross_origin ? 'include' : 'same-origin'
|
|
208
207
|
}).pipe(catchError(this.handleError));
|
|
209
208
|
}
|
|
210
209
|
getUrl(url) {
|
|
211
|
-
console.log(this.config.allow_cross_origin ? 'include' : 'same-origin');
|
|
212
210
|
return this._http.get(url, {
|
|
213
211
|
headers: this.getHeaders(),
|
|
214
212
|
credentials: this.config.allow_cross_origin ? 'include' : 'same-origin'
|
|
@@ -437,7 +435,7 @@ class UserService extends ItemService {
|
|
|
437
435
|
return;
|
|
438
436
|
}
|
|
439
437
|
if (this.authType != "token") {
|
|
440
|
-
console.log("Session Log Out");
|
|
438
|
+
console.log("Session Log Out - changed2");
|
|
441
439
|
let url = "/api-auth/logout/";
|
|
442
440
|
if (this.authType === "oidc") {
|
|
443
441
|
url = "/oidc/logout/";
|
|
@@ -445,7 +443,12 @@ class UserService extends ItemService {
|
|
|
445
443
|
const headers = new HttpHeaders({
|
|
446
444
|
'X-CSRFToken': this.getCsrfCookie()
|
|
447
445
|
});
|
|
448
|
-
this.
|
|
446
|
+
const creds = this.config.allow_cross_origin ? 'include' : 'same-origin';
|
|
447
|
+
this._http.post(this.config.endpoint_url + url, "", {
|
|
448
|
+
headers: headers,
|
|
449
|
+
responseType: 'text',
|
|
450
|
+
credentials: creds
|
|
451
|
+
}).pipe(catchError(this.handleError)).subscribe(_ => { console.log("post logout"); this.sessionLogin(); });
|
|
449
452
|
}
|
|
450
453
|
else {
|
|
451
454
|
console.log("Token Log Out");
|