mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Success message
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user