14 lines
236 B
Python
14 lines
236 B
Python
from typing import List
|
|
|
|
from ninja import Router
|
|
|
|
from .models import Game
|
|
from .schemas import GameOut
|
|
|
|
router = Router()
|
|
|
|
|
|
@router.get("", response=List[GameOut])
|
|
def list_games(request):
|
|
return Game.objects.filter(enabled=True)
|