del user update repo
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user