Changed GET to POST for export
This commit is contained in:
@@ -66,7 +66,7 @@ export class DeltagareExportComponent {
|
|||||||
.pipe(take(1))
|
.pipe(take(1))
|
||||||
.subscribe({
|
.subscribe({
|
||||||
next: response => {
|
next: response => {
|
||||||
const blob = new Blob([response], { type: 'application/csv' });
|
const blob = new Blob([response], { type: 'text/csv' });
|
||||||
saveAs(blob, 'deltagare-export.csv');
|
saveAs(blob, 'deltagare-export.csv');
|
||||||
this.fetchIsLoading$.next(false);
|
this.fetchIsLoading$.next(false);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export class ExportApiService {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return this.httpClient
|
return this.httpClient
|
||||||
.get<Blob>(`${this._apiBaseUrl}/deltagare`, { params, responseType: 'blob' as 'json' })
|
.post<Blob>(`${this._apiBaseUrl}/deltagare`, { params, responseType: 'blob' as 'json' })
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError((error: Error) => {
|
catchError((error: Error) => {
|
||||||
throw new CustomError({
|
throw new CustomError({
|
||||||
|
|||||||
Reference in New Issue
Block a user