14 lines
357 B
Python
14 lines
357 B
Python
from flask_demo_api.protocols.models import KeyDTO
|
|
from flask_demo_api.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)
|