1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Video support field inherits channel support field

This commit is contained in:
Chocobozzz 2018-05-25 18:32:53 +02:00
parent 407eab9c95
commit 74af5145f2
No known key found for this signature in database
GPG key ID: 583A612D890159BE
6 changed files with 46 additions and 6 deletions

View file

@ -17,7 +17,7 @@ function getParameterByName (name: string, url: string) {
return decodeURIComponent(results[2].replace(/\+/g, ' '))
}
function populateAsyncUserVideoChannels (authService: AuthService, channel: any[]) {
function populateAsyncUserVideoChannels (authService: AuthService, channel: { id: number, label: string, support: string }[]) {
return new Promise(res => {
authService.userInformationLoaded
.subscribe(
@ -28,7 +28,7 @@ function populateAsyncUserVideoChannels (authService: AuthService, channel: any[
const videoChannels = user.videoChannels
if (Array.isArray(videoChannels) === false) return
videoChannels.forEach(c => channel.push({ id: c.id, label: c.displayName }))
videoChannels.forEach(c => channel.push({ id: c.id, label: c.displayName, support: c.support }))
return res()
}