Closed KariMuhammad closed 1 month ago
I see it is unnecessary complications, If you want to stop continue the route workflow, just return the value or navigate
to other page, other than that, what value will be given when using next()
concept than current flow?
I see any return statement in middlewares refer to stop execution in the middleware cycle and that causes a lot of confusion for readers about the code.
so I think it will be good if middleware does not return anything if middleware goes forward for the next middleware or calling the
next()
function to refer to the calling next middleware.I think it will make code reading more clear.