tmp(coupons): just export c._id to csv

This commit is contained in:
Tyler Renelle 2014-07-21 22:39:36 -06:00
parent 439828d2b1
commit ca31d46e0e

View file

@ -24,7 +24,7 @@ api.getCoupons = function(req,res,next) {
Coupon.find({},{}, options, function(err,coupons){
//res.header('Content-disposition', 'attachment; filename=coupons.csv');
res.csv([['code']].concat(_.map(coupons, function(c){
return ["Hi, it's nice to meet you! Want some exclusive UnConventional Armor? You can redeem the coupon code at the end of this message at http://habitrpg.com/#/options/settings/coupon (If you haven't already created an account, you'll need to do that first.) See you in the game! COUPON CODE: "+ c._id];
return [c._id];
})));
});
}