index.js 668 Bytes
/**
 * controller 入口
 * @author: feng.chen<feng.chen@yoho.cn>
 * @date: 2017/04/13
 */

'use strict';

const Express = require('express');
const UserController = require('./user');
const FileController = require('./file');
const middleware = require('../common/middleware');
const multipart = require('connect-multiparty');
const multipartMiddleware = multipart();

let router = Express.Router(); // eslint-disable-line

router.post('/login', middleware(UserController, 'login'));
router.post('/logout', middleware(UserController, 'logout'));
router.post('/upload/image', multipartMiddleware, middleware(FileController, 'uploadImage'));


module.exports = router;