router.js
964 Bytes
/**
* router of sub app 3party
* @author: htoooth<ht.anglenx@gmail.com>
* @date: 2016/11/08
*/
'use strict';
const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';
const auth = require(`${global.middleware}/auth`);
const ads = require(`${cRoot}/ads`); // 第三方广告平台对接
const robot = require(`${cRoot}/robot-check`); // 机器人检查
const materialController = require(`${cRoot}/material`);
router.get('/ads', ads.jump);
router.get('/check', robot.index);
router.post('/check', robot.check, robot.isHuman);
router.get('/material', auth, materialController.index);
router.get('/material/newBrandList', auth, materialController.newBrandList);
router.get('/material/getCategory', auth, materialController.getCategory);
router.get('/material/getList', auth, materialController.getList);
router.get('/material/getRecommendlist', auth, materialController.getRecommendlist);
module.exports = router;