I'm using inversify-express-utils
and I'm looking for a way to set an order for how my endpoints are matched.
eg... using express. The router could have
router.get('/users/me')
router.get('/users/:userId')
and the users/me
endpoint would resolve successfully.
But using inversify
, I have endpoints and controllers like so (detail left out just to show decorators)
@controller('/users')
@httpGet('/:userId')
@controller('/users/me')
@httpGet('/')
It seems like the users/me
controller is being registered later, even though I import it earlier, and so it's calling users/:userId
with the userId
param set to me instead.
Is there a way to sort this?