mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-03 20:30:38 +04:00
Connect to database and add first models
This commit is contained in:
8
database/crud.py
Normal file
8
database/crud.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from sqlalchemy.future import select
|
||||
|
||||
from .models import *
|
||||
|
||||
|
||||
async def get_user(db: AsyncSession, user_id: int):
|
||||
return await db.get(User, user_id)
|
||||
Reference in New Issue
Block a user