Skip to content

Commit

Permalink
Use username arg for follow and unfollow requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyGramlich committed Apr 11, 2019
1 parent 64a9223 commit bf6b42a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/User.js
Expand Up @@ -150,7 +150,7 @@ class User extends Requestable {
* @return {Promise} - the promise for the http request
*/
follow(username, cb) {
return this._request('PUT', `/user/following/${this.__user}`, null, cb);
return this._request('PUT', `/user/following/${username}`, null, cb);
}

/**
Expand All @@ -161,7 +161,7 @@ class User extends Requestable {
* @return {Promise} - the promise for the http request
*/
unfollow(username, cb) {
return this._request('DELETE', `/user/following/${this.__user}`, null, cb);
return this._request('DELETE', `/user/following/${username}`, null, cb);
}

/**
Expand Down

0 comments on commit bf6b42a

Please sign in to comment.