We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description
Middlewares inside dynamic routes are not recognized.
Steps To Reproduce
routes/ - _middleware.dart - [id]/ - index.dart - _middleware.dart
import 'package:dart_frog/dart_frog.dart'; Handler middleware(Handler handler) { return handler .use(provider<String>((context) { return 'root middleware haha'; })); }
/[id]
import 'package:dart_frog/dart_frog.dart'; Handler middleware(Handler handler) { return handler .use(provider<String>((context) { return 'id middleware hihi'; })); }
/[id]/index.dart
import 'package:dart_frog/dart_frog.dart'; Response onRequest(RequestContext context) { final thingy = context.read<String>(); return Response(body: 'result: $thingy'); }
http://localhost:8080/someid
result: root middleware haha
Expected Behavior
The handler at /[id]/index.dart should; receive a context with information for the closest middleware, not the root one.
Additional Context
Reproducible with the CLI version 0.0.2-dev.7
0.0.2-dev.7
The text was updated successfully, but these errors were encountered:
related to dart-lang/shelf#250 and google/dart-neats#40
Sorry, something went wrong.
Descoping from 0.1, moving to 1.0
felangel
Successfully merging a pull request may close this issue.
Description
Middlewares inside dynamic routes are not recognized.
Steps To Reproduce
/[id]
, put the following content:/[id]/index.dart
put the following content:http://localhost:8080/someid
result: root middleware haha
Expected Behavior
The handler at
/[id]/index.dart
should; receive a context with information for the closest middleware, not the root one.Additional Context
Reproducible with the CLI version
0.0.2-dev.7
The text was updated successfully, but these errors were encountered: