Skip to content

Commit bf6b42a

Browse files
committed
Use username arg for follow and unfollow requests.
1 parent 64a9223 commit bf6b42a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/User.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class User extends Requestable {
150150
* @return {Promise} - the promise for the http request
151151
*/
152152
follow(username, cb) {
153-
return this._request('PUT', `/user/following/${this.__user}`, null, cb);
153+
return this._request('PUT', `/user/following/${username}`, null, cb);
154154
}
155155

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

167167
/**

0 commit comments

Comments
 (0)