index.js 345 Bytes
const model = require('../models');

exports.index = (req, res) => {
    const channelType = req.path.substring(1) || 'men';

    model.getContent(channelType).then(result => {
        res.display('index', Object.assign({
            module: 'channel',
            page: 'home',
            dataPage: channelType
        }, result));
    });
};