все наконец то работает

This commit is contained in:
Максим Яковлев 2024-05-05 20:26:18 +04:00
parent 1f5558c190
commit dd020b8935
5 changed files with 12 additions and 10 deletions

View File

@ -102,7 +102,7 @@ namespace CarRepairShopBusinessLogic.BusinessLogics
{
throw new ArgumentNullException("Нет почты клиента", nameof(model.Email));
}
if (string.IsNullOrEmpty(model.Password))
if (string.IsNullOrEmpty(model.Password) || !Regex.IsMatch(model.Password, @"^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$", RegexOptions.IgnoreCase))
{
throw new ArgumentNullException("Нет пароля клиента", nameof(model.ClientFIO));
}

View File

@ -120,6 +120,8 @@ namespace CarRepairShopBusinessLogic.BusinessLogics
return false;
}
element.Status = newStatus;
var clientView = _clientStorage.GetElement(new() { Id = element.ClientId });
SendMail(clientView, element);

View File

@ -134,7 +134,7 @@ namespace CarRepairShopClientApp.Controllers
{
return Redirect("~/Home/Enter");
}
return View(APIClient.GetRequest<List<MessageInfoViewModel>>($"api/client/getmessages?clientId = {APIClient.Client.Id}"));
return View(APIClient.GetRequest<List<MessageInfoViewModel>>($"api/client/getmessages?clientId={APIClient.Client.Id}"));
}
}
}

View File

@ -7,11 +7,11 @@
},
"AllowedHosts": "*",
"SmtpClientHost": "smtp.gmail.com",
"SmtpClientHost": "smtp.mail.ru",
"SmtpClientPort": "587",
"PopHost": "pop.gmail.com",
"PopHost": "pop.mail.ru",
"PopPort": "995",
"MailLogin": "shotboll16@gmail.com",
"MailPassword": "iexy xqps iwrj ihle"
"MailLogin": "labwork7@mail.ru",
"MailPassword": "i135ssgqi7jEzphpyVH9"
}

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="SmtpClientHost" value="smtp.gmail.com" />
<add key="SmtpClientHost" value="smtp.mail.ru" />
<add key="SmtpClientPort" value="587" />
<add key="PopHost" value="pop.gmail.com" />
<add key="PopHost" value="pop.mail.ru" />
<add key="PopPort" value="995" />
<add key="MailLogin" value="shotboll16@gmail.com" />
<add key="MailPassword" value="iexy xqps iwrj ihle" />
<add key="MailLogin" value="labwork7@mail.ru" />
<add key="MailPassword" value="i135ssgqi7jEzphpyVH9" />
</appSettings>
</configuration>