'use strict';
let couponsModel = require('../models/coupons-model');

const index = (req, res, next)=>{
    let uid = req.user.uid;

    req.ctx(couponsModel).couponsData(uid, req.query).then(result => {
        res.render('coupons', result);
    }).catch(next);
};

module.exports = {
    index
};