소스 검색

EmailNotExist error

zinab_elgendy 1 주 전
부모
커밋
7e044b3c50
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      MTWorkHR.Application/Services/Auth/AuthService.cs

+ 2 - 2
MTWorkHR.Application/Services/Auth/AuthService.cs

@@ -35,12 +35,12 @@ namespace MTWorkHR.Identity.Services
             var user = await _userManager.FindByEmailAsync(request.Email);           
             if (user == null)
             {
-                throw new AppException(ExceptionEnum.RecordNotExist);
+                throw new AppException(ExceptionEnum.EmailNotExist);
             }
             var result = await _signInManager.CheckPasswordSignInAsync(user, request.Password, false);
             if(!result.Succeeded)
             {
-                throw new AppException($"Credentials for '{request.Email} are not valid'.");
+                throw new AppException(GlobalInfo.lang == "en"? $"Credentials for '{request.Email} are not valid'." : $"كلمة المرور غير صحيحة.");
             }
             var userResponse = await _userService.GetById(user.Id);