public dynamic SignInEtudiantrVerification(EtudiantRequestAuthentification e) { Etudiant E = getInformationsEtudiant(_mapper.Map <Etudiant>(e)); if (E == null) { return new { response = "vous devez créer tout d'abord un compte ou vérifiez vos informations" } } ; else { if (E.Etat_compte == e.Etat_compte) { E.Etat_compte = "verifié"; _etudiant.ReplaceOne(etudiant => etudiant.Email == E.Email, E); EtudiantProfile E1 = _mapper.Map <EtudiantProfile>(E); return(new { token = GenerateToken(E), response = E1 }); } else { return new { response = "votre code est erroné, vous devez le ressaisir" } }; } }
public dynamic SignInEtudiant(EtudiantRequestAuthentification e) { Etudiant E = getInformationsEtudiant(_mapper.Map <Etudiant>(e)); if (E == null) { return("vous devez créer tout d'abord un compte ou vérifiez vos informations"); } else { if (E.Etat_compte != "verifié") { return new { response = "vous devez saisir le code envoyé à votre courrier éléctornique" } } ; EtudiantProfile E1 = _mapper.Map <EtudiantProfile>(E); return(new { token = GenerateToken(E), response = E1 }); } }
public ActionResult <dynamic> SignInEtudiantrVerification(EtudiantRequestAuthentification e) { dynamic message = _EtudiantServices.SignInEtudiantrVerification(e); return(Ok(message)); }