using Microsoft.AspNetCore.Mvc;
using NostrServices.Client;
using NostrServices.Services;

namespace NostrServices.Controllers;

[Route("/api/v1/pubkeys")]
public class PubkeyStatsController : Controller
{
    private readonly RedisStore _store;

    public PubkeyStatsController(RedisStore store)
    {
        _store = store;
    }

    [HttpGet]
    public async Task<List<PubKeyStat>?> GetStats()
    {
        return await _store.GetPubkeyStats();
    }
}
