Skip to content

Commit

Permalink
Merge pull request #256 from georgebejan/develop
Browse files Browse the repository at this point in the history
Fix file download for download answers
  • Loading branch information
aniri authored Sep 27, 2020
2 parents caa972a + 6b08be8 commit d4d908f
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

1 comment on commit d4d908f

@vercel
Copy link

@vercel vercel bot commented on d4d908f Sep 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.