coupons.js
303 Bytes
'use strict';
let couponsModel = require('../models/coupon-service');
const index = (req, res, next)=>{
let uid = req.user.uid;
req.ctx(couponsModel).getCouponData(uid, req.query).then(result => {
res.render('coupons', result);
}).catch(next);
};
module.exports = {
index
};