router.js 598 Bytes
/**
 * router of sub app shopping
 * @author: jinhu.dong<jinhu.dong@yoho.cn>
 * @date: 2016/07/04
 */

'use strict';

const router = require('express').Router(); // eslint-disable-line
const auth = require(`${global.doraemon}/middleware/auth`);

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

const uploadApi = require('./controllers/upload.js');
const wechat = require('./controllers/wechat.js');

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

router.get('/wechat/share/token', wechat.shareToken);

module.exports = router;