router.js 746 Bytes
/**
 * router of sub app common
 * @author: xuqi<qi.xu@yoho.cn>
 * @date: 2016/10/11
 */

'use strict';

const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';

var multipart = require('connect-multiparty');
var multipartMiddleware = multipart();

const rvCtrl = require(`${cRoot}/recent-view`);
const cache = require(`${cRoot}/secret-switch`);
const uploadCtrl = require(`${cRoot}/upload`);
const erp2goods = require(`${cRoot}/erp2goods`);

router.get('/recentReview', rvCtrl.index); // 最近浏览

router.post('/upload/image', multipartMiddleware, uploadCtrl.uploadImg);

router.get('/erp2goods', erp2goods.find);

router.get('/secret-switch', cache.index); // 设置cache

module.exports = router;