From cdfc734271407db340b7ca69da97d1fd3d1c4da5 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Wed, 21 Dec 2016 18:40:18 -0500 Subject: [PATCH] Inject --- README.md | 2 +- lib/src/http/controller.dart | 7 ++++++- pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0a2dea28..1bb23ee0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # angel_framework -[![pub 1.0.0-dev.37](https://img.shields.io/badge/pub-1.0.0--dev.37-red.svg)](https://pub.dartlang.org/packages/angel_framework) +[![pub 1.0.0-dev.38](https://img.shields.io/badge/pub-1.0.0--dev.38-red.svg)](https://pub.dartlang.org/packages/angel_framework) [![build status](https://travis-ci.org/angel-dart/framework.svg)](https://travis-ci.org/angel-dart/framework) Core libraries for the Angel Framework. \ No newline at end of file diff --git a/lib/src/http/controller.dart b/lib/src/http/controller.dart index c575215b..0c7c6af1 100644 --- a/lib/src/http/controller.dart +++ b/lib/src/http/controller.dart @@ -34,7 +34,6 @@ class Controller { "All controllers must carry an @Expose() declaration."); } - final routable = new Routable(debug: true); configureRoutes(routable); @@ -80,6 +79,12 @@ class Controller { if (req.injections.containsKey(name)) { args.add(req.injections[name]); continue; + } else if (name == "req") { + args.add(req); + continue; + } else if (name == "res") { + args.add(res); + continue; } final type = parameter.type.reflectedType; diff --git a/pubspec.yaml b/pubspec.yaml index 7a9b56d0..9eaf899f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 1.0.0-dev.37 +version: 1.0.0-dev.38 description: Core libraries for the Angel framework. author: Tobe O homepage: https://github.com/angel-dart/angel_framework