router.js 552 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 validateCode = require('../passport/controllers/validateCode');

// routers

router.get('/ads', ads.index);
router.get('/check', validateCode.load, check.index);
router.post('/check/submit', validateCode.check, check.submit);

module.exports = router;