Skip to content
Snippets Groups Projects
Unverified Commit 3300e4a0 authored by Pierre-Yves Bigourdan's avatar Pierre-Yves Bigourdan Committed by GitHub
Browse files

Small [YouTube] cleanup (#9860)

parent 700566ff
No related branches found
Tags 37.74.2
No related merge requests found
......@@ -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) {
......@@ -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 })
}
}
......
......@@ -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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment