mirror of
https://github.com/encounter/decomp.me.git
synced 2026-03-30 11:06:27 -07:00
18 lines
526 B
Python
18 lines
526 B
Python
from rest_framework.request import Request
|
|
from rest_framework.response import Response
|
|
from rest_framework.views import APIView
|
|
|
|
from ..models.scratch import Asm, Scratch
|
|
from ..models.github import GitHubUser
|
|
|
|
|
|
class StatsDetail(APIView):
|
|
def get(self, request: Request) -> Response:
|
|
return Response(
|
|
{
|
|
"asm_count": Asm.objects.count(),
|
|
"scratch_count": Scratch.objects.count(),
|
|
"github_user_count": GitHubUser.objects.count(),
|
|
}
|
|
)
|