router.js
824 Bytes
/**
* 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');
const hotfix = require(`${cRoot}/hotfix`);
const apple = require(`${cRoot}/apple`);
const rn = require(`${cRoot}/rn`);
const forward = require(`${cRoot}/forward`);
// routers
router.post('/api/upload/image', multipartMiddleware, uploadApi.uploadImg);
router.post('/hf/v1', hotfix.v1);
router.post('/rn/v1', rn.v1);
router.get('/.well-known/apple-app-site-association', apple.appSiteAssociation);
router.get('/api/wechat/miniapp.jpg', forward.miniapp);
module.exports = router;