mirror of https://github.com/Chocobozzz/PeerTube
Fix video update
parent
ff0497fee8
commit
1fa23d6f5e
|
@ -1,4 +1,4 @@
|
||||||
import { map } from 'rxjs/operators'
|
import { first, map } from 'rxjs/operators'
|
||||||
import { SelectChannelItem } from 'src/types/select-options-item.model'
|
import { SelectChannelItem } from 'src/types/select-options-item.model'
|
||||||
import { DatePipe } from '@angular/common'
|
import { DatePipe } from '@angular/common'
|
||||||
import { HttpErrorResponse } from '@angular/common/http'
|
import { HttpErrorResponse } from '@angular/common/http'
|
||||||
|
@ -23,7 +23,9 @@ function getParameterByName (name: string, url: string) {
|
||||||
|
|
||||||
function listUserChannels (authService: AuthService) {
|
function listUserChannels (authService: AuthService) {
|
||||||
return authService.userInformationLoaded
|
return authService.userInformationLoaded
|
||||||
.pipe(map(() => {
|
.pipe(
|
||||||
|
first(),
|
||||||
|
map(() => {
|
||||||
const user = authService.getUser()
|
const user = authService.getUser()
|
||||||
if (!user) return undefined
|
if (!user) return undefined
|
||||||
|
|
||||||
|
@ -42,7 +44,8 @@ function listUserChannels (authService: AuthService) {
|
||||||
support: c.support,
|
support: c.support,
|
||||||
avatarPath: c.avatar?.path
|
avatarPath: c.avatar?.path
|
||||||
}) as SelectChannelItem)
|
}) as SelectChannelItem)
|
||||||
}))
|
})
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAbsoluteAPIUrl () {
|
function getAbsoluteAPIUrl () {
|
||||||
|
|
Loading…
Reference in New Issue