This commit is contained in:
Илья Федотов 2024-06-01 06:50:29 +04:00
parent 80f101fd23
commit c98d2d261a
2 changed files with 7 additions and 3 deletions

View File

@ -57,7 +57,7 @@ namespace ElectronicsShopRestAPI.Controllers {
} }
} }
[HttpGet] [HttpPost]
public void CreatePaymeant (PaymeantBindingModel model) { public void CreatePaymeant (PaymeantBindingModel model) {
try { try {
_payLogic.CreatePay(model); _payLogic.CreatePay(model);

View File

@ -287,6 +287,10 @@ namespace ElectronicsShopUserApp.Controllers {
return PaymeantOption.Íåîïëà÷åíî; return PaymeantOption.Íåîïëà÷åíî;
} }
} }
[HttpPost]
public double Calc(int count, int product) {
var _product = APIClient.GetRequset<ProductViewModel>($"api/main/getproduct?_productid={product}");
return count * (_product?.Price ?? 1);
}
} }
} }