feat: add API endpoint to get devices list
This commit is contained in:
parent
0cb5706ed7
commit
f4b7daabd3
9 changed files with 66 additions and 1 deletions
10
server/backend/services/devices_service.py
Normal file
10
server/backend/services/devices_service.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from domain.entities import Device
|
||||
from adapters.postgres.device_repository import DeviceRepository
|
||||
|
||||
|
||||
class DeviceService:
|
||||
def __init__(self, device_repo: DeviceRepository) -> None:
|
||||
self._device_repo = device_repo
|
||||
|
||||
def get_all_devices(self) -> list[Device]:
|
||||
return self._device_repo.get_all()
|
||||
Loading…
Add table
Add a link
Reference in a new issue