nswbmw / koa-scheme

koa-scheme is a parameter validation middleware for koa.
46 stars 2 forks source link

router多了之后如何把一个scheme拆分成多个 #5

Closed timeswind closed 7 years ago

nswbmw commented 7 years ago

scheme.js

module.exports = {
  "POST /signup": require('./signup'),
  "POST /signout": require('./signout')
};

signup.js

module.exports = {
  "request": {
    "session": checkNotLogin
  }
}

signout.js

module.exports = {
  "request": {
    "session": checkLogin
  }
}