data export commit, supports exporting task history via csv

*adds the following new dependencies: moment, express-csv
*recommend replacing functionality of 'relative-date' with features from 'moment'
*supports retrieval of CSV history via the API and in browser
**/api/v1/export/history (requires typical API authorization)
**/export/history.csv (requires session authorization)
*adds new routes for data export
This commit is contained in:
Nick Gordon
2013-11-15 06:18:16 -08:00
parent 528fd5f067
commit 7bf1bf2af0
7 changed files with 78 additions and 1 deletions
+9
View File
@@ -0,0 +1,9 @@
var express = require('express');
var router = new express.Router();
var dataexport = require('../controllers/dataexport');
var nconf = require('nconf');
/* Data export */
router.get('/history.csv',dataexport.auth,dataexport.history); //[todo] encode data output options in the data controller and use these to build routes
module.exports = router;