mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-06 18:41:12 +01:00
33 lines
817 B
C#
33 lines
817 B
C#
|
using System.Threading.Tasks;
|
||
|
using BTCPayServer.Data;
|
||
|
using BTCPayServer.Services.Apps;
|
||
|
using BTCPayServer.Services.Stores;
|
||
|
using Microsoft.AspNetCore.Identity;
|
||
|
using Microsoft.AspNetCore.Mvc;
|
||
|
|
||
|
namespace BTCPayServer.Components.AppTopItems;
|
||
|
|
||
|
public class AppTopItems : ViewComponent
|
||
|
{
|
||
|
private readonly AppService _appService;
|
||
|
private readonly StoreRepository _storeRepo;
|
||
|
|
||
|
public AppTopItems(AppService appService, StoreRepository storeRepo)
|
||
|
{
|
||
|
_appService = appService;
|
||
|
_storeRepo = storeRepo;
|
||
|
}
|
||
|
|
||
|
public async Task<IViewComponentResult> InvokeAsync(AppData app)
|
||
|
{
|
||
|
var entries = await _appService.GetPerkStats(app);
|
||
|
var vm = new AppTopItemsViewModel
|
||
|
{
|
||
|
App = app,
|
||
|
Entries = entries
|
||
|
};
|
||
|
|
||
|
return View(vm);
|
||
|
}
|
||
|
}
|