router.js
715 Bytes
/**
* router of sub app cart
* @author: xuan.chen@yoho.cn<xuan.chen@yoho.cn>
* @date: 2016/09/26
*/
'use strict';
const router = require('express').Router(); //eslint-disable-line
const cRoot = './controllers';
const authMW = require('../../doraemon/middleware/auth');
const seckill = require(cRoot + '/seckill');
const countController = require(`${cRoot}/count`);
// Your controller here
router.all('/index/seckill/', authMW);
router.all('/index/seckill/*', authMW);
router.get('/index/seckill/', seckill.ensure);
router.post('/index/seckill/compute', seckill.compute);
router.post('/index/seckill/submit', seckill.submit);
router.get('/index/count', countController.cartCount);
module.exports = router;