From da4971c11f16b541804b5071d543166cd3954a98 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 26 Sep 2016 22:54:34 +0200 Subject: Client: fix error alert --- client/src/app/admin/friends/friend-add/friend-add.component.ts | 2 +- client/src/app/admin/friends/friend-list/friend-list.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'client/src/app/admin/friends') 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) ); } } -- cgit v1.2.3