app/infra/db中 router 迁移并更新,清理 infra 层的旧 router
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from fastapi import Depends
|
||||
from psycopg import AsyncConnection
|
||||
|
||||
from app.auth.project_dependencies import (
|
||||
get_project_pg_connection,
|
||||
get_project_timescale_connection,
|
||||
)
|
||||
|
||||
|
||||
async def get_timescale_connection(
|
||||
conn: AsyncConnection = Depends(get_project_timescale_connection),
|
||||
):
|
||||
yield conn
|
||||
|
||||
|
||||
async def get_postgres_connection(
|
||||
conn: AsyncConnection = Depends(get_project_pg_connection),
|
||||
):
|
||||
yield conn
|
||||
Reference in New Issue
Block a user