Fixed error with loading
This commit is contained in:
@@ -82,12 +82,6 @@ export class LoginComponent implements OnInit {
|
||||
}
|
||||
|
||||
async addUser() {
|
||||
const loading = await this.loadCtrl.create({
|
||||
message: 'Connexion...',
|
||||
spinner: 'lines-sharp-small'
|
||||
});
|
||||
await loading.present();
|
||||
|
||||
if (this.user().userForm.invalid) {
|
||||
const toast = await this.toastCtrl.create({
|
||||
message: 'Tout les champs sont requis',
|
||||
@@ -97,6 +91,13 @@ export class LoginComponent implements OnInit {
|
||||
await toast.present();
|
||||
return false;
|
||||
}
|
||||
|
||||
const loading = await this.loadCtrl.create({
|
||||
message: 'Création du compte...',
|
||||
spinner: 'lines-sharp-small'
|
||||
});
|
||||
await loading.present();
|
||||
|
||||
try {
|
||||
const users = this.user().userForm.getRawValue();
|
||||
await firstValueFrom(this.usersService.createUserEndpoint(users));
|
||||
|
||||
Reference in New Issue
Block a user