1
0
Fork 0
This commit is contained in:
Lucas Dohmen 2013-03-23 16:53:17 +01:00
parent 629a519ca7
commit 0f2cfa75c6
1 changed files with 7 additions and 7 deletions

View File

@ -83,7 +83,7 @@ FoxxApplication = function (options) {
this.routingInfo.middleware = [
{
url: {match: "/*"},
action: {callback: myMiddleware}
action: {callback: String(myMiddleware)}
}
];
};
@ -105,7 +105,7 @@ _.extend(FoxxApplication.prototype, {
// use this function.
start: function () {
'use strict';
db._routing.save(this.routingInfo);
db._collection("_routing").save(this.routingInfo);
},
// The `handleRequest` method is the raw way to create a new
@ -240,10 +240,10 @@ _.extend(FoxxApplication.prototype, {
this.routingInfo.middleware.push({
url: {match: path},
action: {callback: function (req, res, opts, next) {
action: {callback: String(function (req, res, opts, next) {
func(req, res);
next();
}}
})}
});
},
@ -266,10 +266,10 @@ _.extend(FoxxApplication.prototype, {
this.routingInfo.middleware.push({
url: {match: path},
action: {callback: function (req, res, opts, next) {
action: {callback: String(function (req, res, opts, next) {
next();
func(req, res);
}}
})}
});
},
@ -299,7 +299,7 @@ _.extend(FoxxApplication.prototype, {
this.routingInfo.middleware.push({
url: { match: "/*" },
action: { callback: new FormatMiddleware(allowedFormats, defaultFormat) }
action: { callback: String(new FormatMiddleware(allowedFormats, defaultFormat)) }
});
}
});