Open its-dibo opened 7 months ago
as a suggestion, we can extend the decorator @Crud
, but I don't think this is the best approach
@its-dibo I am not sure I fully understand your question/request but let me try to answer :)
1st you should note that there is no base controller! The Crud methods are injected by the decorator like you would do a mixin. The relevant code , see here for the implementation https://github.com/gid-oss/dataui-nestjs-crud/blob/master/packages/crud/src/crud/crud-routes.factory.ts#L320 .
So you can extend your controller from whatever base class you want/need, just keep in mind that all the route methods will be overridden by the decorator unless you decorate them with @Override.
Hope that helps!
we can implement the interface
CrudController<Entity>
, is there a way to provide a class that extendsCrudController
instead of the original one?sure we can create a class from scratch that implements CrudController, but in this case we'll need to implement all methods from scratch, unless the class itself is exposed