router.js 776 Bytes
/**
 * router of sub app service
 * @author: liqi <qi.li@yoho.cn>
 * @date: 2016/11/04
 */
'use strict';

const router = require('express').Router(); // eslint-disable-line
const auth = require(`${global.middleware}/auth`);
const cRoot = './controllers';

// 在线客服controller
const client = require(`${cRoot}/client`);

// 在线客服
router.get('/client', auth, client.index);            // 在线客服
router.get('/domains', auth, client.domains);         // 域名配置
router.post('/history', auth, client.history);        // 消息记录
router.post('/evaluate', auth, client.saveEval);      // 评价
router.post('/leaveMsg', auth, client.saveMessage);   // 留言
router.post('/queryReason', auth, client.queryReason);// 评价原因

module.exports = router;