mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
22 lines
602 B
JavaScript
22 lines
602 B
JavaScript
|
'use strict';
|
||
|
|
||
|
var _koaRouter = require('koa-router');
|
||
|
|
||
|
var _koaRouter2 = _interopRequireDefault(_koaRouter);
|
||
|
|
||
|
var _interface = require('./controllers/interface');
|
||
|
|
||
|
var _interface2 = _interopRequireDefault(_interface);
|
||
|
|
||
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||
|
|
||
|
var router = (0, _koaRouter2.default)();
|
||
|
|
||
|
var interface_PREFIX = {
|
||
|
interface: '/interface/',
|
||
|
user: '/user/'
|
||
|
};
|
||
|
|
||
|
router.get(interface_PREFIX.interface + 'add', _interface2.default.add).get(interface_PREFIX.interface + 'list', _interface2.default.list);
|
||
|
|
||
|
module.exports = router;
|