diff --git a/BlacksmithWorkshop/BlacksmithWorkshop/App.config b/BlacksmithWorkshop/BlacksmithWorkshop/App.config
index 4734522..ad9202d 100644
--- a/BlacksmithWorkshop/BlacksmithWorkshop/App.config
+++ b/BlacksmithWorkshop/BlacksmithWorkshop/App.config
@@ -5,7 +5,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/BusinessLogics/OrderLogic.cs b/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/BusinessLogics/OrderLogic.cs
index 58bfcb0..723de2c 100644
--- a/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/BusinessLogics/OrderLogic.cs
+++ b/BlacksmithWorkshop/BlacksmithWorkshopBusinessLogic/BusinessLogics/OrderLogic.cs
@@ -69,7 +69,7 @@ namespace BlacksmithWorkshopBusinessLogic.BusinessLogics
_logger.LogWarning("Insert operation failed");
return false;
}
- SendOrderStatusMail(model.ClientId, $"Изменен статус заказа #{res.Id}", $"Заказ #{res.Id} изменен статус на {model.Status}");
+ SendOrderStatusMail(res.ClientId, $"Изменен статус заказа #{res.Id}", $"Заказ #{res.Id} изменен статус на {model.Status}");
return true;
}
private bool SendOrderStatusMail(int clientId, string subject, string text)
@@ -106,7 +106,13 @@ namespace BlacksmithWorkshopBusinessLogic.BusinessLogics
model.DateImplement = DateTime.Now;
if (element.ImplementerId.HasValue)
model.ImplementerId = element.ImplementerId;
- _orderStorage.Update(model);
+ var result = _orderStorage.Update(model);
+ if (result == null)
+ {
+ _logger.LogWarning("Update operation failed");
+ return false;
+ }
+ SendOrderStatusMail(result.ClientId, $"Изменен статус заказа #{result.Id}", $"Заказ #{result.Id} изменен статус на {result.Status}");
return true;
}
public bool TakeOrderInWork(OrderBindingModel model)
diff --git a/BlacksmithWorkshop/BlacksmithWorkshopRestApi/appsettings.json b/BlacksmithWorkshop/BlacksmithWorkshopRestApi/appsettings.json
index 4bde0df..805e230 100644
--- a/BlacksmithWorkshop/BlacksmithWorkshopRestApi/appsettings.json
+++ b/BlacksmithWorkshop/BlacksmithWorkshopRestApi/appsettings.json
@@ -10,6 +10,6 @@
"SmtpClientPort": "587",
"PopHost": "pop.gmail.com",
"PopPort": "995",
- "MailLogin": "r.for.labs@gmail.com",
- "MailPassword": "jouu dcra gclx keup"
+ "MailLogin": "forlabspibd23@gmail.com",
+ "MailPassword": "euby honk jvrl rrjj"
}