Sats.
This commit is contained in:
parent
bc65752ea2
commit
a1840cd034
10
src/snek/view/stats.py
Normal file
10
src/snek/view/stats.py
Normal 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')
|
Loading…
Reference in New Issue
Block a user