+27
This commit is contained in:
parent
774edb4be8
commit
93ea5bf6f1
3 changed files with 10 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
# angel_framework
|
||||
|
||||
![version 1.0.0-dev.26](https://img.shields.io/badge/version-1.0.0--dev.26-red.svg)
|
||||
![version 1.0.0-dev.27](https://img.shields.io/badge/version-1.0.0--dev.27-red.svg)
|
||||
![build status](https://travis-ci.org/angel-dart/framework.svg)
|
||||
|
||||
Core libraries for the Angel Framework.
|
|
@ -34,7 +34,11 @@ class Controller {
|
|||
"All controllers must carry an @Expose() declaration.");
|
||||
}
|
||||
|
||||
app.use(exposeDecl.path, generateRoutable(classMirror));
|
||||
|
||||
final routable = new Routable(debug: true);
|
||||
configureRoutes(routable);
|
||||
|
||||
app.use(exposeDecl.path, routable);
|
||||
TypeMirror typeMirror = reflectType(this.runtimeType);
|
||||
String name = exposeDecl.as;
|
||||
|
||||
|
@ -125,14 +129,11 @@ class Controller {
|
|||
};
|
||||
}
|
||||
|
||||
Routable generateRoutable(ClassMirror classMirror) {
|
||||
final routable = new Routable(debug: true);
|
||||
final handlers = []..addAll(exposeDecl.middleware)..addAll(middleware);
|
||||
|
||||
void configureRoutes(Routable routable) {
|
||||
ClassMirror classMirror = reflectClass(this.runtimeType);
|
||||
InstanceMirror instanceMirror = reflect(this);
|
||||
final handlers = []..addAll(exposeDecl.middleware)..addAll(middleware);
|
||||
final callback = _callback(instanceMirror, routable, handlers);
|
||||
classMirror.instanceMembers.forEach(callback);
|
||||
|
||||
return routable;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: angel_framework
|
||||
version: 1.0.0-dev.26
|
||||
version: 1.0.0-dev.27
|
||||
description: Core libraries for the Angel framework.
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/angel_framework
|
||||
|
|
Loading…
Reference in a new issue