Skip to content
Snippets Groups Projects
Commit 4a61fc32 authored by FORESTIER Fabien's avatar FORESTIER Fabien
Browse files

Add wtihCredential option to http requests that needs to send creadentials

parent 7929a246
Branches
No related tags found
1 merge request!3v1.1.0
Pipeline #2897 passed
......@@ -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);
}),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment