Skip to content

Commit 76dbfb6

Browse files
committed
refactor: apply aggregate pattern in app/service/location
1 parent 1c7e4ae commit 76dbfb6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/services/location/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
from abc import ABC, abstractmethod
33

44

5+
class LocationServices:
6+
def __init__(self,location_services: list[LocationService]):
7+
self.location_services = location_services
8+
9+
def add_service(self,location_service):
10+
self.location_services.append(location_service)
11+
512
class LocationService(ABC):
613
"""
714
Service for retrieving locations.

0 commit comments

Comments
 (0)