Get api/Login -> WhoAmI
This commit is contained in:
@@ -16,7 +16,7 @@ using Microsoft.AspNetCore.Authorization;
|
||||
Authorize(AuthenticationSchemes = "Identity.Application")]
|
||||
public class InventoryController : Controller {
|
||||
#region Constants
|
||||
private const int AMOUNT_SCROLL = 5;
|
||||
private const int AMOUNT_SCROLL = 6;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -136,7 +136,7 @@ public class InventoryController : Controller {
|
||||
public ActionResult<int> Delete(int? id) {
|
||||
int rid = 0;
|
||||
if (!id.HasValue) {
|
||||
_logger.LogError(8, "Delete sans Id.");
|
||||
_logger.LogError(8, "Tentative de vente sans Id.");
|
||||
return BadRequest();
|
||||
}
|
||||
try {
|
||||
@@ -151,7 +151,7 @@ public class InventoryController : Controller {
|
||||
Product.States.Discontinued :
|
||||
Product.States.BackOrder;
|
||||
} else {
|
||||
_logger.LogError(8, "Vente de produit pas en stock.");
|
||||
_logger.LogError(8, $"Vente de produit pas en stock. Id Produit: {prod.Id}");
|
||||
return BadRequest();
|
||||
}
|
||||
_context.Products.Update(prod);
|
||||
|
Reference in New Issue
Block a user