Open infomiho opened 1 week ago
The way we define CRUD router and the apis router is conflicting.
router.use('/', middleware, rootCrudRouter) router.use(apis)
The router.use('/', middleware, ...) code sets the defaultmiddleware for all the routes under / which is ... all routes 😄 This breaks the custom middleware option of the custom API routes feature.
router.use('/', middleware, ...)
/
Related Discord thread: https://ptb.discord.com/channels/686873244791210014/1253382715135234211/1253707556614832160
/crud/*
rootCrudRouter
The way we define CRUD router and the apis router is conflicting.
The
router.use('/', middleware, ...)
code sets the defaultmiddleware for all the routes under/
which is ... all routes 😄 This breaks the custom middleware option of the custom API routes feature.Related Discord thread: https://ptb.discord.com/channels/686873244791210014/1253382715135234211/1253707556614832160
Possible fixes
/crud/*
(breaking for existing users)rootCrudRouter
(more precise)