From 9813671556d131d15792d842cdd300a367180db6 Mon Sep 17 00:00:00 2001 From: DaviMarinho Date: Thu, 16 Nov 2023 10:32:05 -0300 Subject: [PATCH] Melhora mensagens de erro Signed-off-by: DaviMarinho --- src/app/pages/register/register.component.ts | 4 ++-- src/app/pages/reset-password/reset-password.component.html | 2 +- src/app/pages/reset-password/reset-password.component.ts | 2 +- src/app/pages/video/video.component.ts | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/pages/register/register.component.ts b/src/app/pages/register/register.component.ts index 147db421..732ec4fe 100644 --- a/src/app/pages/register/register.component.ts +++ b/src/app/pages/register/register.component.ts @@ -48,7 +48,7 @@ export class RegisterComponent implements OnInit { }); }, error: (error) => { - console.error(error); + this.alertService.showMessage("error", "Erro", error.error.detail); }, }); } @@ -66,7 +66,7 @@ export class RegisterComponent implements OnInit { this.navigator('/activeAccount'); }, error: (error) => { - console.error(error); + this.alertService.showMessage("error", "Erro", error.error.detail); }, }); } else { diff --git a/src/app/pages/reset-password/reset-password.component.html b/src/app/pages/reset-password/reset-password.component.html index c4229ae4..16ea11ab 100644 --- a/src/app/pages/reset-password/reset-password.component.html +++ b/src/app/pages/reset-password/reset-password.component.html @@ -13,6 +13,6 @@
- + diff --git a/src/app/pages/reset-password/reset-password.component.ts b/src/app/pages/reset-password/reset-password.component.ts index 39f24537..1aacf6fe 100644 --- a/src/app/pages/reset-password/reset-password.component.ts +++ b/src/app/pages/reset-password/reset-password.component.ts @@ -42,7 +42,7 @@ export class ResetPasswordComponent implements OnInit { this.navigator('/login'); }, error: (error) => { - console.error(error); + this.alertService.showMessage("error", "Erro", "Os campos estão incorretos, preencha os campos correctamente."); }, }); } else { diff --git a/src/app/pages/video/video.component.ts b/src/app/pages/video/video.component.ts index 1815a6df..dcff846d 100644 --- a/src/app/pages/video/video.component.ts +++ b/src/app/pages/video/video.component.ts @@ -22,11 +22,10 @@ export class VideoComponent implements OnInit { findAll(): void { this.videoService.findAll().subscribe({ next: (data) => { - // console.log(data); this.videosEduplay = data.body?.videoList || []; }, error: (error) => { - console.error(error); + console.log(error); }, } );