Blame view

apps/service/router.js 743 Bytes
1 2 3 4 5 6 7 8
/**
 * 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
李奇 authored
9
const auth = require(`${global.middleware}/auth`);
10 11 12 13 14 15
const cRoot = './controllers';

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

// 在线客服
yyq authored
16 17 18 19 20
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); // 留言
李奇 authored
21
router.post('/queryReason', auth, client.queryReason);// 评价原因
22 23

module.exports = router;