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