Skip to content
New issue

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

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

Already on GitHub? # to your account

Inversify Express controller inheritance fail if inheriting from more than 1 controller #358

Open
aescarcha opened this issue Nov 26, 2021 · 0 comments

Comments

@aescarcha
Copy link

After updating to the latest version of inversify and inversify-express-utils, I can't have controller inheritance working with more than 1 base controller, like BaseController -> BaseApiController -> PostController, URLs from BaseController return 404

Expected Behavior

You should be able to extend as many base controllers as you like and keep the methods and URLs

Current Behavior

The base endpoints return 404

Steps to Reproduce (for bugs)

  1. Get a fresh copy of https://github.com/inversify/inversify-express-utils and npm install
  2. Replace controller_inheritance.test.ts with my gist https://gist.github.com/aescarcha/341db9d36ccff444b8ad1368e2c834c2
  3. npm run test should fail

Context

I like splitting my controllers and using a lot of inheritances, like having a base controller, then a query controller, and a paginateable controller all inheriting the previous one

Your Environment

I'm on macOS Catalina, node 14.5.0, using all other deps from inversify-express-utils

@PodaruDragos PodaruDragos transferred this issue from inversify/InversifyJS Jan 28, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant