2024-04-16 01:03:02 +03:00
|
|
|
from flask_demo_api.protocols.models import KeyDTO
|
|
|
|
from flask_demo_api.protocols.repository import Repository
|
2024-04-15 09:32:17 +03:00
|
|
|
|
|
|
|
|
|
|
|
class PutKey:
|
|
|
|
def __init__(
|
|
|
|
self,
|
|
|
|
repository: Repository,
|
|
|
|
) -> None:
|
|
|
|
self.__repository = repository
|
|
|
|
|
2024-04-16 04:48:10 +03:00
|
|
|
def __call__(self, request: KeyDTO) -> KeyDTO | None:
|
2024-04-15 09:32:17 +03:00
|
|
|
return self.__repository.put_key(obj=request)
|