Skip to content

Commit

Permalink
fix app.set app.get
Browse files Browse the repository at this point in the history
  • Loading branch information
guileen committed Aug 13, 2012
1 parent 49c2975 commit 3d76bcb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/kick.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ var exports = module.exports = function(options) {
req.res = res;
res.req = req;
res.locals = {};
app.settings = {};

// path, querystring
var pathAndQuery = req.url.split('?', 2);
Expand Down Expand Up @@ -139,13 +138,15 @@ var exports = module.exports = function(options) {
}

var _get = app.get;
app.settings = {};

app.set = function(key, val){
app.settings[key] = val;
return app;
}

app.get = function() {
if(arguments.length == 1) return app.settings[key];
if(arguments.length == 1) return app.settings[arguments[0]];
_get.apply(null, arguments);
}

Expand Down

0 comments on commit 3d76bcb

Please sign in to comment.