aichbauer / express-routes-mapper

a small mapper for express routes
MIT License
21 stars 16 forks source link

add wrapper function to controller #32

Closed joneldiablo closed 5 years ago

joneldiablo commented 5 years ago

to avoid the bind this in controllers I add a function wrapper ´´´ const controllerFunc = (req, res, next) => contr[controllerMethod](req, res, next); router.route(myPath)requestMethod; router.route(myPath)[requestMethod](middlewares, controllerFunc); ´´´

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-5.5%) to 84.694% when pulling 3a1d56ddfc54f8c36e95cf6ccddc43d07bb014d0 on joneldiablo:master into 2a61ffdf608823390e604634fa45802b63ae7360 on aichbauer:master.

aichbauer commented 5 years ago

@joneldiablo thank you for contributing 👍 What exactly is the problem that you are trying to solve?

If you make a PR you should create a own fork and start on a new branch which is even with the master... I see you have commits from a another PR...

aichbauer commented 5 years ago

Close due to no response.