private notifier: Notifier,
private router: Router,
private videoChannelService: VideoChannelService
- ) {
+ ) {
super()
}
.pipe(
switchMap(() => this.uploadAvatar()),
switchMap(() => this.uploadBanner())
- ).subscribe(
- () => {
+ ).subscribe({
+ next: () => {
this.authService.refreshUserInformation()
this.notifier.success($localize`Video channel ${videoChannelCreate.displayName} created.`)
- this.router.navigate(['/my-library', 'video-channels'])
+ this.router.navigate([ '/my-library', 'video-channels' ])
},
- err => {
+ error: err => {
if (err.status === HttpStatusCode.CONFLICT_409) {
this.error = $localize`This name already exists on this instance.`
return
this.error = err.message
}
- )
+ })
}
onAvatarChange (formData: FormData) {