Permalink
Browse files

Merge pull request #2 from elijahparker/master

Bugfixes
  • Loading branch information...
2 parents ce77a83 + 5c33f0b commit bf7cacb87dacc2da0165877b1188cb9cac53248c @valorkin valorkin committed Jan 19, 2014
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/client.js
  2. +1 −1 lib/routes/v2.js
View
@@ -91,7 +91,7 @@
// backward compatibility for not node.js style callbacks
// TBD: skip in next version?
else if (callback.length === 1) {
- var toreturn = {status: 'ok', data: '', headers: res.headers };
+ var toreturn = {status: 'ok', data: '', headers: res ? res.headers : null };
if (err) {
toreturn.status = 'error';
if (!res || err === Error || err instanceof Error) {
@@ -142,4 +142,4 @@
};
};
-})();
+})();
View
@@ -2,7 +2,7 @@ exports.accounts = {
list: ['/v2/accounts', 'GET'],
get: ['/v2/accounts/:account_code', 'GET'],
create: ['/v2/accounts', 'POST'],
- update: ['/v2/accounts/:account_code', 'POST'],
+ update: ['/v2/accounts/:account_code', 'PUT'],
close: ['/v2/accounts/:account_code', 'DELETE'],
reopen: ['/v2/accounts/:account_code/reopen', 'PUT']
}

0 comments on commit bf7cacb

Please sign in to comment.