Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pvorb committed Aug 7, 2012
1 parent d0898a4 commit b6b3bc6
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,22 @@ function Server () {
this.emit(path, req, resp);
else {
// check if method is defined
if (method = this.methods[req.method])
if (method = this.methods[req.method]) {
// for each listener of method
for (var listener in method) {
var match;
var p = method[listener].pattern;

// match it
if ((match = p.exec(req.url)) != null) {
// add to resp
resp.match = match;
// callback
method[listener].callback(req, resp);
return;
}
var match;
var p = method[listener].pattern;

// match it
if ((match = p.exec(req.url)) != null) {
// add to resp
resp.match = match;
// callback
method[listener].callback(req, resp);
return;
}
}
}
this.emit('regularRequest', req, resp);
}
});
Expand Down

0 comments on commit b6b3bc6

Please sign in to comment.