from repository.file_system_repository import FileSystemRepository
from helpers.either import Either, Left, Right
from models.env_model import EnvModel


class EnvReaderUseCase:
    def call() -> Either:
        try:
            return Left(EnvModel.from_dict(FileSystemRepository.readJSON("env.json")))
        except:
            print("env reader error")
            return Right(None)
