there are several issues with the same theme, but I could not solve my problem.
Error: Route.post() requires callback functions but got a [object Undefined]
at R
You want to be sure to check that your spellings are correct for the export and the import. Also make sure your middleware are properly exported and imported.
From the code you are sharing, you should export each middleware individually as
exports.Create
, exports.Update
etc. Setting up your export this way will make it possible to access it the way you are currently accessing it view the Controller
variable in your rutas.js
file.