zinab_elgendy 1 неделя назад
Родитель
Сommit
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);