Complete repository delegation - remove remaining direct db operations

- Add commit() method to AvailabilityRepository for transaction control
- Add refresh() method to UserRepository
- Update AvailabilityService to use repository.commit() instead of db.commit()
- Update AuthService to use UserRepository.refresh() instead of db.refresh()
- All services now consistently delegate ALL persistence to repositories
This commit is contained in:
counterweight 2025-12-25 18:57:55 +01:00
parent 33aa8ad13b
commit db181b338c
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
4 changed files with 13 additions and 4 deletions

View file

@ -58,3 +58,7 @@ class UserRepository:
await self.db.commit()
await self.db.refresh(user)
return user
async def refresh(self, user: User) -> None:
"""Refresh a user instance from the database."""
await self.db.refresh(user)