更新依赖项

This commit is contained in:
2017-07-16 22:56:44 +08:00
parent 3df9391bc1
commit 6232645481
8 changed files with 127 additions and 43 deletions

View File

@ -4,13 +4,14 @@ import controllers from '../controllers/index.js'
const router = new KoaRouter()
router
.get('/', function (ctx, next) {
.get('/public/get', function (ctx, next) {
ctx.body = '禁止访问!'
}) // HOME 路由
}) // 以/public开头则不用经过权限认证
.all('/upload', controllers.upload.default)
.get('/api/:name', controllers.api.Get)
.post('/api/:name', controllers.api.Post)
.put('/api/:name', controllers.api.Put)
.del('/api/:name', controllers.api.Delect)
.post('/auth/:action', controllers.auth.Post)
module.exports = router