Permalink
Browse files

Fix methods.

  • Loading branch information...
roncli committed Dec 21, 2017
1 parent 16ed520 commit 399138ab202242a87b2c656788b23a819abd4d93
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/site/modules/chat/twitch/index.js
@@ -592,7 +592,7 @@ class Twitch extends Chat {
const twitch = this,
{api} = this;

return api.getTwitchUserByName(username).then((data) => data.id).then((id) => api.sendApiRequest(`users/${twitch.id}/follows/channel/${id}`, {requestOptions: {json: {notifications: !!notifications}}, method: "put", api: "kraken"}));
return api.getTwitchUserByName(username).then((data) => data.id).then((id) => api.sendApiRequest(`users/${twitch.id}/follows/channel/${id}`, {requestOptions: {method: "PUT", json: {notifications: !!notifications}}, api: "kraken"}));
}

// # ## ##
@@ -605,7 +605,7 @@ class Twitch extends Chat {
const twitch = this,
{api} = this;

return api.getTwitchUserByName(username).then((data) => data.id).then((id) => api.sendApiRequest(`users/${twitch.id}/follows/channel/${id}`, {method: "delete", api: "kraken"}));
return api.getTwitchUserByName(username).then((data) => data.id).then((id) => api.sendApiRequest(`users/${twitch.id}/follows/channel/${id}`, {requestOptions: {method: "DELETE"}, api: "kraken"}));
}

// # ## #
@@ -761,7 +761,7 @@ class Twitch extends Chat {
setStatus(channel, status) {
const {api} = this;

return api.getTwitchUserByName(channel).then((data) => data.id).then((id) => api.sendApiRequest(`channels/${id}`, {requestOptions: {json: {channel: status}}, method: "put", api: "kraken"}));
return api.getTwitchUserByName(channel).then((data) => data.id).then((id) => api.sendApiRequest(`channels/${id}`, {requestOptions: {method: "PUT", json: {channel: status}}, api: "kraken"}));
}
}

0 comments on commit 399138a

Please sign in to comment.