vip.js 496 Bytes
'use strict';
const vipModel = require('../models/vip-service');

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

    req.ctx(vipModel).vipIndex(uid).then(result => {
        res.render('vip', result);
    }).catch(next);
};

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

    req.ctx(vipModel).getVipRecord(uid, req.query || {}).then(result => {
        res.render('vip-details', result);
    }).catch(next);
};

module.exports = {
    index,
    details
};