Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible features: #6

Open
r3wt opened this issue Aug 14, 2017 · 0 comments
Open

possible features: #6

r3wt opened this issue Aug 14, 2017 · 0 comments

Comments

@r3wt
Copy link
Owner

r3wt commented Aug 14, 2017

  1. parsing string global middleware. currently only function middleware are able to be used.

currently supported

var Middleware = require('controllers/Middleware');

app.map('/api/v1/test', Middlewarer.parseJWT, Middleware.isUser, {
 'GET /user':'User.loadOne'
});

proposed support

app.map('/api/v1/test', 'Middlewarer.parseJWT, Middleware.isUser', {
 'GET /user':'User.loadOne'
});
  1. support comma seperated http methods. make sure to prevent duplicate handlers.

currently supported

app.map('/api/v1/test',{
  'GET /:id':'Test.get',
  'POST /:id':'Test.create',
  'PUT /:id':'Test.update',
  'Delete /:id':'Test.delete'
});

proposed support

app.map('/api/v1/test',{
  'GET, POST, PUT, DELETE /:id':'Test.crud'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant