flask-demo-api/flask_demo_api/usecase/get.py

14 lines
323 B
Python

from protocols.models import KeyDTO
from protocols.repository import Repository
class GetKey:
def __init__(
self,
repository: Repository,
) -> None:
self.repository = repository
def __call__(self, request: KeyDTO) -> KeyDTO | None:
return self.repository.get_key(obj=request)