2024-04-15 04:02:47 +03:00
|
|
|
from protocols.models import KeyDTO
|
|
|
|
from protocols.repository import Repository
|
2024-04-15 02:16:07 +03:00
|
|
|
|
|
|
|
|
|
|
|
class GetKey:
|
|
|
|
def __init__(
|
|
|
|
self,
|
|
|
|
repository: Repository,
|
|
|
|
) -> None:
|
2024-04-15 09:32:17 +03:00
|
|
|
self.__repository = repository
|
2024-04-15 02:16:07 +03:00
|
|
|
|
|
|
|
def __call__(self, request: KeyDTO) -> KeyDTO | None:
|
2024-04-15 09:32:17 +03:00
|
|
|
return self.__repository.get_key(obj=request)
|