router.js
1.04 KB
/**
* router of sub app service
* @author: xuan.chen@yoho.cn<xuan.chen@yoho.cn>
* @date: 2016/11/21
*/
'use strict';
const router = require('express').Router(); //eslint-disable-line
const cRoot = './controllers';
const chat = require(`${cRoot}/chat`);
const chatQa = require(`${cRoot}/chatQa`); // 问题搜索列表页
// middlware
const authGuard = require('../../doraemon/middleware/auth');
// Your controller here
router.get('/im', chat.appAdapter, authGuard, chat.page);
router.get('/im/fetchHistory', chat.fetchHistory);
router.get('/getOrders', chat.getOrders);
router.get('/im/global-list', chat.queryGlobalOrder);
router.get('/im/order-list', chat.fetchOrders);
router.post('/leavemsg/save.json', chat.saveMSG);
router.post('/im/saveEvalute', chat.saveEvalute);
router.get('/chatQaList', chatQa.qaList); // 问题搜索列表页
router.get('/qaSearch', chatQa.qaSearch); // 问题搜索页
router.get('/qaDetail', chatQa.qaDetail); // 问题详情页
router.get('/keySearch', chatQa.keySearch); // 问题搜索关键词
module.exports = router;