From: Chocobozzz Date: Mon, 26 Sep 2016 20:54:34 +0000 (+0200) Subject: Client: fix error alert X-Git-Tag: v0.0.1-alpha~723 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=da4971c11f16b541804b5071d543166cd3954a98;p=oweals%2Fpeertube.git Client: fix error alert --- diff --git a/client/src/app/admin/friends/friend-add/friend-add.component.ts b/client/src/app/admin/friends/friend-add/friend-add.component.ts index 7aab82b97..64165a9a5 100644 --- a/client/src/app/admin/friends/friend-add/friend-add.component.ts +++ b/client/src/app/admin/friends/friend-add/friend-add.component.ts @@ -87,7 +87,7 @@ export class FriendAddComponent implements OnInit { this.router.navigate([ '/admin/friends/list' ]); // } }, - error => alert(error) + error => alert(error.text) ); } diff --git a/client/src/app/admin/friends/friend-list/friend-list.component.ts b/client/src/app/admin/friends/friend-list/friend-list.component.ts index afbb48c1c..88c4800ee 100644 --- a/client/src/app/admin/friends/friend-list/friend-list.component.ts +++ b/client/src/app/admin/friends/friend-list/friend-list.component.ts @@ -24,7 +24,7 @@ export class FriendListComponent implements OnInit { alert('Quit friends!'); this.getFriends(); }, - error => alert(error) + error => alert(error.text) ); } @@ -32,7 +32,7 @@ export class FriendListComponent implements OnInit { this.friendService.getFriends().subscribe( friends => this.friends = friends, - err => alert(err) + err => alert(err.text) ); } } diff --git a/client/src/app/admin/requests/request-stats/request-stats.component.ts b/client/src/app/admin/requests/request-stats/request-stats.component.ts index 6a9739bbf..4b0844574 100644 --- a/client/src/app/admin/requests/request-stats/request-stats.component.ts +++ b/client/src/app/admin/requests/request-stats/request-stats.component.ts @@ -32,7 +32,7 @@ export class RequestStatsComponent implements OnInit, OnDestroy { this.runInterval(); }, - err => alert(err) + err => alert(err.text) ); } diff --git a/client/src/app/videos/video-list/video-miniature.component.ts b/client/src/app/videos/video-list/video-miniature.component.ts index f807d17ac..398d2db75 100644 --- a/client/src/app/videos/video-list/video-miniature.component.ts +++ b/client/src/app/videos/video-list/video-miniature.component.ts @@ -36,7 +36,7 @@ export class VideoMiniatureComponent { if (confirm('Do you really want to remove this video?')) { this.videoService.removeVideo(id).subscribe( status => this.removed.emit(true), - error => alert(error) + error => alert(error.text) ); } }