From 644977634813c1ddd6ac52007687d08a174389ac Mon Sep 17 00:00:00 2001 From: MahanCh Date: Wed, 9 Jul 2025 13:15:05 +0330 Subject: [PATCH] feat : add payment transaction controller --- .../PaymentTransactionController.cs | 23 +++++++++++++++++++ .../BaseControllers/AdminBaseController.cs | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 ServiceHost/Areas/Admin/Controllers/PaymentTransactionController.cs diff --git a/ServiceHost/Areas/Admin/Controllers/PaymentTransactionController.cs b/ServiceHost/Areas/Admin/Controllers/PaymentTransactionController.cs new file mode 100644 index 00000000..dec6a4ec --- /dev/null +++ b/ServiceHost/Areas/Admin/Controllers/PaymentTransactionController.cs @@ -0,0 +1,23 @@ +using CompanyManagment.App.Contracts.PaymentTransaction; +using Microsoft.AspNetCore.Mvc; +using ServiceHost.BaseControllers; + +namespace ServiceHost.Areas.Admin.Controllers; + +public class PaymentTransactionController : AdminBaseController +{ + private readonly IPaymentTransactionApplication _paymentTransactionApplication; + + public PaymentTransactionController(IPaymentTransactionApplication paymentTransactionApplication) + { + _paymentTransactionApplication = paymentTransactionApplication; + } + + [HttpGet] + public async Task>> GetList( + GetPaymentTransactionListSearchModel searchModel) + { + var res = await _paymentTransactionApplication.GetPaymentTransactionList(searchModel); + return res; + } +} \ No newline at end of file diff --git a/ServiceHost/BaseControllers/AdminBaseController.cs b/ServiceHost/BaseControllers/AdminBaseController.cs index 3b046fc4..2ba56a71 100644 --- a/ServiceHost/BaseControllers/AdminBaseController.cs +++ b/ServiceHost/BaseControllers/AdminBaseController.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Mvc; namespace ServiceHost.BaseControllers; -//[Authorize(Policy = "AdminArea")] +[Authorize(Policy = "AdminArea")] [Area("Admin")] [ApiExplorerSettings(GroupName = "Admin")] [Route("api/[area]/[controller]")]