general-tabs.js
499 Bytes
'use strict';
const _ = require('lodash');
const headerService = require('../models/general-tabs-service');
const getCommonHeader = (req, res, next) => {
let channel = req.query.channel;
let uid = req.user.uid;
let clientService = _.get(req.app.locals.pc, 'clientService.new', false);
headerService.getHomeNav(uid, channel, req.originalUrl, clientService).then((result)=>{
_.merge(res.locals, result);
next();
});
};
module.exports = {
getCommonHeader
};