Files
Backend-Api/ServiceHost/Areas/Admin/Controllers/PaymentTransactionController.cs
2025-07-10 11:55:18 +03:30

33 lines
1.1 KiB
C#

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<ActionResult<List<GetPaymentTransactionListViewModel>>> GetList(
GetPaymentTransactionListSearchModel searchModel)
{
var res = await _paymentTransactionApplication.GetPaymentTransactionList(searchModel);
return res;
}
[HttpGet("wallet-Amount")]
public async Task<IActionResult> GetWalletAmount(CancellationToken cancellationToken)
{
var res = await _paymentTransactionApplication.GetWalletAmount(cancellationToken);
if (res.Code!=0)
{
return BadRequest(res);
}
return Ok(res);
}
}