Spaces:
Running on T4
Running on T4
File size: 435 Bytes
2756f0f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | from uuid import UUID
from sqlalchemy import delete
from app.common.base_repository import BaseRepository
from app.modules.devices.models import Device
class DeviceRepository(BaseRepository[Device]):
model = Device
async def delete_own(self, account_id: UUID, push_token: str) -> None:
await self.session.execute(
delete(Device).where(Device.account_id == account_id, Device.push_token == push_token))
|