Success message

This commit is contained in:
Peter Maquiran
2021-07-22 16:06:52 +01:00
parent e8049830c7
commit c20ab17274
18 changed files with 98 additions and 43 deletions
+8 -1
View File
@@ -9,6 +9,7 @@ import { BehaviorSubject, Observable } from 'rxjs';
import { AuthConnstants } from '../config/auth-constants';
import { AlertController } from '@ionic/angular';
import { LocalstoreService } from '../store/localstore.service';
import { ToastService } from './toast.service';
@Injectable({
providedIn: 'root'
@@ -27,7 +28,8 @@ export class AuthService {
private storageService:StorageService,
private router:Router,
public alertController: AlertController,
private localstoreService: LocalstoreService
private localstoreService: LocalstoreService,
private toastService: ToastService,
) {
this.headers = new HttpHeaders();
@@ -80,6 +82,11 @@ export class AuthService {
}
} catch (error) {
if(error.status == 0) {
this.toastService.badRequest('Verifique a sua conexão com a internet e volte a tentar')
} else {
this.toastService.badRequest('O email e/ou palavra-passe estão incorretas ou verifique a sua conexão com a internet e volte a tentar');
}
return false;
}