del user update repo

This commit is contained in:
IluaAir
2025-09-06 22:06:46 +03:00
parent 7fe13be684
commit 6fa74bffe8

View File

@@ -12,17 +12,6 @@ from src.repository.base import BaseRepo
class UsersRepo(BaseRepo):
model: type[UsersORM] = UsersORM
async def update_one(self, id: int, data: dict) -> UsersORM:
stmt = (
update(self.model)
.where(self.model.id == id)
.values(data)
.returning(self.model)
)
result = await self.session.execute(stmt)
model = result.scalar_one()
return model
async def get_one_with_load(
self,
user_id: int,