sql.db -> sql(.init)

This commit is contained in:
DarkCat09 2023-02-27 20:11:55 +04:00
parent a91613cbd3
commit 8311d12d20
5 changed files with 70 additions and 70 deletions

View file

@ -9,7 +9,7 @@ from starlette_wtf import csrf_protect
from . import Paths
from .. import respond
from ..sql import db
from .. import sql
from ..sql import crud
from ..sql import schemas
from ..forms import get_form
@ -26,7 +26,7 @@ class TablePaths(Paths):
def list_users(
req: Request,
page: int = 0,
db: Session = Depends(db.get_db)) -> Response:
db: Session = Depends(sql.get_db)) -> Response:
return respond.with_tmpl(
'table.html',
@ -43,7 +43,7 @@ class TablePaths(Paths):
@csrf_protect
async def add_form(
req: Request,
db_s: Session = Depends(db.get_db)) -> Response:
db_s: Session = Depends(sql.get_db)) -> Response:
form = await get_form(AddUserForm, req)