router.js
957 Bytes
/**
* router of sub app coupon
* @author: lixia.zhang<lixia.zhang@yoho.cn>
* @date: 2016/05/31
*/
'use strict';
const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';
const ads = require(`${cRoot}/ads`);
const check = require(`${cRoot}/check`);
const question = require(`${cRoot}/question`);
const auth = require('../../doraemon/middleware/auth');
// const material = require(`${cRoot}/material`);
const materialNew = require(`${cRoot}/material-new`);
// routers
router.get('/ads', ads.index);
router.get('/check', check.index);
router.post('/check/submit', check.submit);
router.get('/questionnaire', auth, question.list);
router.post('/questionnaire/check', question.check);
router.post('/questionnaire/submit', question.geetestCheck, question.submit);
router.get('/questionnaire/:id', question.geetestLoad, question.detail);
router.get('/material', auth, materialNew.list);
module.exports = router;