Refactors Services and API Endpoints

This commit is contained in:
2024-05-20 22:36:42 -03:00
parent aeaa45bde6
commit 83f531c2d7
16 changed files with 172 additions and 120 deletions

View File

@@ -3,7 +3,12 @@ from dotenv import load_dotenv
import os
def get_virus_checker_api_key():
def get_virus_checker_api_key() -> str:
load_dotenv()
return {"api_key": os.environ.get("VIRUS_CHECKER_API_KEY")}
api_key = os.environ.get("VIRUS_CHECKER_API_KEY")
if not api_key:
raise RuntimeError("Virus Checker API Key not found")
return api_key