Skip to content

Commit

Permalink
Fix file download for download answers
Browse files Browse the repository at this point in the history
  • Loading branch information
George Bejan authored and George Bejan committed Sep 27, 2020
1 parent caa972a commit 6b08be8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/app/components/answer/answer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class AnswerComponent implements OnInit {
}

return this.answersService.downloadAnswers(filter).subscribe(res => {
FileSaver.saveAs(res, 'anwsers.xlsx');
FileSaver.saveAs(res, 'answsers.xlsx');
});
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/services/answers.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class AnswersService {
const urlWithParams = paramBuilder.build();

const url: string = Location.joinWithSlash(this.baseUrl, urlWithParams);
return this.http.get<Blob>(url);
return this.http.get<Blob>(url, {responseType: 'blob' as 'json'});
}
}

Expand Down

0 comments on commit 6b08be8

Please sign in to comment.