refactored code to place the booking specific actions inside a gestion-sports element
This commit is contained in:
parent
1ec148e866
commit
552db2aa8a
3 changed files with 11 additions and 12 deletions
|
@ -2,7 +2,7 @@ import asyncio
|
|||
import logging
|
||||
|
||||
import config
|
||||
from gestion_sports.gestion_sports_operations import GestionSportsOperations
|
||||
from gestion_sports.gestion_sports_platform import GestionSportsPlatform
|
||||
from models import BookingFilter, Club, User
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
@ -17,7 +17,7 @@ async def book(club: Club, user: User, booking_filter: BookingFilter) -> int | N
|
|||
:param booking_filter: the information related to the booking
|
||||
:return: the id of the booked court, or None if no court was booked
|
||||
"""
|
||||
async with GestionSportsOperations(club) as platform:
|
||||
async with GestionSportsPlatform(club) as platform:
|
||||
return await platform.book(user, booking_filter)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue