Small [YouTube] cleanup (#9860)
This commit is contained in:
committed by
GitHub
parent
700566ff26
commit
3300e4a09d
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user