Redenvelopes.js
458 Bytes
'use strict';
const Promise = require('bluebird');
const co = Promise.coroutine;
const RedenvelopesModel = require('../models/RedenvelopesModel');
const index = (req, res, next)=>{
let $uid = '8041246';// req.user.uid;
co(function*() {
let result = yield RedenvelopesModel.redenvelopesList($uid);
res.render('Redenvelopes', {
meRedEnvelopes: result
});
})().catch(next);
};
module.exports = {
index
};