router.js 532 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

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

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

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

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

module.exports = router;