diff --git a/src/app/services/organization.service.ts b/src/app/services/organization.service.ts index d5a82d7ce9d00a5b3a3aeebd765a1a93fca73923..689c7407ef08430af970d1ed7eb7fabde66bab85 100644 --- a/src/app/services/organization.service.ts +++ b/src/app/services/organization.service.ts @@ -50,7 +50,7 @@ export class OrganizationService { } delete(id) { - return this._httpClient.delete(APP_CONFIG.organizations.url + id); + return this._httpClient.delete(APP_CONFIG.organizations.url + id, { withCredentials: true }); } uploadLogoAndSaveOrganization(logoFile, organization) { @@ -66,7 +66,7 @@ export class OrganizationService { const formData = new FormData(); formData.append('file', logoFile); - return this._httpClient.post<string>(`${APP_CONFIG.mediaLibrary.url}media`, formData).pipe( + return this._httpClient.post<string>(`${APP_CONFIG.mediaLibrary.url}media`, formData, { withCredentials: true }).pipe( map((response) => { return response; }), @@ -75,14 +75,14 @@ export class OrganizationService { replaceOrCreate(data: Organization): Observable<Organization> { if (data.id) { - return this._httpClient.put<IOrganization>(APP_CONFIG.organizations.url + data.id, data).pipe( + return this._httpClient.put<IOrganization>(APP_CONFIG.organizations.url + data.id, data, { withCredentials: true }).pipe( map((response) => { return new Organization(response); }), ); } - return this._httpClient.post<IOrganization>(APP_CONFIG.organizations.url, data).pipe( + return this._httpClient.post<IOrganization>(APP_CONFIG.organizations.url, data, { withCredentials: true }).pipe( map((response) => { return new Organization(response); }),