Skip to content

Commit

Permalink
Small [YouTube] cleanup (#9860)
Browse files Browse the repository at this point in the history
  • Loading branch information
PyvesB authored Dec 30, 2023
1 parent 700566f commit 3300e4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions services/youtube/youtube-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class YouTubeBase extends BaseJsonService {
)
}

async handle({ channelId, videoId }, queryParams) {
async handle({ channelId, videoId }) {
const id = channelId || videoId
const json = await this.fetch({ id })
if (json.pageInfo.totalResults === 0) {
Expand All @@ -79,7 +79,7 @@ class YouTubeBase extends BaseJsonService {
})
}
const statistics = json.items[0].statistics
return this.constructor.render({ statistics, id }, queryParams)
return this.constructor.render({ statistics, id })
}
}

Expand Down
5 changes: 2 additions & 3 deletions services/youtube/youtube-likes.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,11 @@ export default class YouTubeLikes extends YouTubeVideoBase {
]
}

static render({ statistics, id }, queryParams) {
const renderedBadge = super.renderSingleStat({
static render({ statistics, id }) {
return super.renderSingleStat({
statistics,
statisticName: 'like',
id,
})
return renderedBadge
}
}

0 comments on commit 3300e4a

Please sign in to comment.