Skip to content

Commit

Permalink
Swapped block/activate to use put
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-norman-rft committed May 18, 2015
1 parent b7f6769 commit de374d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Models/Users.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
fn = null;
}
this.debug("Users::block()");
return this.post("users/" + (parseInt(userId)) + "/block", {}, function(data) {
return this.put("users/" + (parseInt(userId)) + "/block", {}, function(data) {
if (fn) {
return fn(data);
}
Expand All @@ -160,7 +160,7 @@
fn = null;
}
this.debug("Users:unblock()");
return this.post("users/" + (parseInt(userId)) + "/activate", {}, function(data) {
return this.put("users/" + (parseInt(userId)) + "/activate", {}, function(data) {
if (fn) {
return fn(data);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Models/Users.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ class Users extends BaseModel

block: (userId, fn = null) =>
@debug "Users::block()"
@post "users/#{parseInt userId}/block", {}, (data) -> fn data if fn
@put "users/#{parseInt userId}/block", {}, (data) -> fn data if fn

activate: (userId, fn = null) =>
@debug "Users:unblock()"
@post "users/#{parseInt userId}/activate", {}, (data) -> fn data if fn
@put "users/#{parseInt userId}/activate", {}, (data) -> fn data if fn

module.exports = (client) -> new Users client

0 comments on commit de374d8

Please sign in to comment.