Compare commits
2 Commits
Feature/pr
...
Feature/Ch
| Author | SHA1 | Date | |
|---|---|---|---|
| ab604d3be5 | |||
|
|
d713cbb1fe |
@@ -165,6 +165,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="padding-top: 10px" class="print-qrcode">
|
||||
<img src="https://bwipjs-api.metafloor.com/?bcid=code128&text=Chkt_@Model.Id&includetext=false" alt="Barcode">
|
||||
@* <img src="https://api.qrserver.com/v1/create-qr-code/?size=100x100&data=Chkt_@Model.Id" alt="QR Code"> *@
|
||||
</div>
|
||||
|
||||
<div class="row m-t-20">
|
||||
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 10px;overflow:hidden">
|
||||
|
||||
31
ServiceHost/Controllers/CheckoutController.cs
Normal file
31
ServiceHost/Controllers/CheckoutController.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Checkout;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace ServiceHost.Controllers;
|
||||
|
||||
public record ApiSignCheckoutRequest(long Id);
|
||||
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class CheckoutController : ControllerBase
|
||||
{
|
||||
private readonly ICheckoutApplication _checkoutApplication;
|
||||
|
||||
public CheckoutController(ICheckoutApplication checkoutApplication)
|
||||
{
|
||||
_checkoutApplication = checkoutApplication;
|
||||
}
|
||||
|
||||
[HttpPost("Sign")]
|
||||
public ActionResult<OperationResult> SignCheckout([FromBody] ApiSignCheckoutRequest data)
|
||||
{
|
||||
var result = _checkoutApplication.Sign(data.Id);
|
||||
if (result.IsSuccedded)
|
||||
{
|
||||
return Ok(result);
|
||||
}
|
||||
return BadRequest(result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user