Return geoapi store geojson

This commit is contained in:
phil 2023-12-17 12:20:07 +05:30
parent 4048e61221
commit 1b7db43ee7
4 changed files with 44 additions and 40 deletions

View file

@ -1,5 +1,5 @@
from contextlib import asynccontextmanager
from typing import Annotated
from typing import Annotated, AsyncContextManager
from sqlalchemy.ext.asyncio import create_async_engine
from sqlmodel.ext.asyncio.session import AsyncSession
@ -23,7 +23,7 @@ async def get_db_session() -> AsyncSession:
yield session
@asynccontextmanager
async def db_session() -> AsyncSession:
async def db_session() -> AsyncContextManager[AsyncSession]:
async with AsyncSession(engine) as session:
yield session