Blame view

apps/api/router.js 533 Bytes
陈轩 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/**
 * router of sub app api
 * @author: 陈轩<xuan.chen@yoho.cn>
 * @date: 2016/09/02
 */

'use strict';

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

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

const uploadApi = require(cRoot + '/upload.js');
姜枫 authored
17 18 19 20
const hotfix = require(`${cRoot}/hotfix`);

// routers
陈轩 authored
21
router.post('/upload/image', multipartMiddleware, uploadApi.uploadImg);
姜枫 authored
22
router.post('/hf/v1', hotfix.v1);
陈轩 authored
23 24

module.exports = router;