Closed insinfo closed 3 years ago
Use app.chain(
Thank you for indicating a solution. I was going to suggest modifying line 164 of the router.dart file with that.
/// Creates a route, and allows you to add child routes to it
/// via a [Router] instance.
///
/// Returns the created route.
/// You can also register middleware within the router.
SymlinkRoute<T> group(String path, void Function(Router<T> router) callback, {Iterable<T> middleware, String name}) {
//from this
// middleware ??= <T>[];
// final router = Router<T>().._middleware.addAll(middleware);
//Isaque changed it here
//to this
final router = Router<T>();
callback(router);
if (middleware != null) {
router._routes.forEach((element) {
element.handlers.insertAll(0, middleware);
});
}
return mount(path, router)..name = name;
}
I will follow up with your solution
group middleware not working in angel_framework 2.1.1 middleware is not being called