only db from api

This commit is contained in:
waylon 2023-06-20 17:18:07 -05:00
parent da41253583
commit c2bba92e39
4 changed files with 15 additions and 42 deletions

View file

@ -82,4 +82,6 @@ async def get_heros(
session: Session = Depends(get_session),
) -> Heros:
"get all heros"
return Heros.list(session=session)
statement = select(Hero)
heros = session.exec(statement).all()
return Heros(heros=heros)