Skip to content
This repository has been archived by the owner on May 28, 2018. It is now read-only.

Commit

Permalink
Change export file format to csv
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrohee committed Feb 10, 2017
1 parent 34847eb commit 19a51ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/api/application/application.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ class ApplicationController {
return Application
.find({ 'pepite.pepite': req.params.id }).exec()
.then((applications) => {
var filename = 'data.xls'
var filename = 'data.csv'
res.attachment(filename)
return res.end(json2csv({ data: applications, fields: applicationExportFields, del: '\t' }), 'UTF-8')
return res.end(json2csv({ data: applications, fields: applicationExportFields, del: '\t' }))
})
.catch((err) => {
req.log.error(err)
Expand Down

0 comments on commit 19a51ce

Please sign in to comment.