This commit is contained in:
retoor 2025-04-13 05:08:20 +02:00
parent bc65752ea2
commit a1840cd034

10
src/snek/view/stats.py Normal file
View File

@ -0,0 +1,10 @@
from snek.system.view import BaseView
import json
from aiohttp import web
class StatsView(BaseView):
async def get(self):
data = await self.app.cache.get_stats()
data = json.dumps({"total": len(data), "stats": data}, default=str, indent=1)
return web.Response(text=data, content_type='application/json')