Browse files

extend resource with incoming data

  • Loading branch information...
1 parent 5b08827 commit e1b319058cfd740822439781e65b99e98ab36082 @jed committed Apr 16, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 sajak.js
View
4 sajak.js
@@ -192,6 +192,10 @@ App.prototype.router = function(req, res, next) {
return next(err)
}
+ Object.keys(data).forEach(function(key) {
+ resource[key] = data[key]
+ })
+
if (!resource[action]) {
err = new Error("Method Not Allowed")
err.status = 405

0 comments on commit e1b3190

Please sign in to comment.