Skip to content

Commit

Permalink
Merge pull request #96 from c17r/fix-fetchRelationship
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo authored Feb 21, 2024
2 parents 9c69372 + dfc5840 commit d6f7bcd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libs/Twitch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,14 +653,14 @@ export default class Twitch {
}

const params = {
from_id: Twitch.userId,
to_id: targetId,
user_id: Twitch.userId,
broadcaster_id: targetId,
}

const response = await Twitch.fetch(TwitchApi.Helix, '/users/follows', params)
const response = await Twitch.fetch(TwitchApi.Helix, '/channels/followed', params)
const relationships = (await response.json()) as RawRelationships

if (relationships.total === 1) {
if (relationships.data.length === 1) {
const relationship = _.head(relationships.data)

if (!_.isNil(relationship)) {
Expand Down

0 comments on commit d6f7bcd

Please sign in to comment.