From e8d42c9b55c8982b0bbd35bdd4985544fe463104 Mon Sep 17 00:00:00 2001 From: Paraskevas Paraskevas Date: Sat, 10 Feb 2024 10:06:01 +0000 Subject: [PATCH] updating certify and cryptography packages --- app.py | 5 +++-- models/query_model.py | 2 +- requirements.txt | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index cc9d690..6a33921 100644 --- a/app.py +++ b/app.py @@ -165,9 +165,10 @@ async def authenticated(request: Request): @app.post("/save-to-github/{username}/{repository}") -async def save_to_github(repository: str, request: Request, file: GitHubFile): +async def save_to_github(repository: str, username:str, request: Request, file: GitHubFile): log.info("Starting save to github route") - + #potentially remove the repository parameter and add file.repository + log.info(f"repo value is {repository} username value is {username}") if 'auth_token' not in request.state.session: log.info("auth token not in session, raising exception") raise HTTPException(status_code=401, detail="Not authenticated with GitHub") diff --git a/models/query_model.py b/models/query_model.py index d2aa40a..2d78d5a 100644 --- a/models/query_model.py +++ b/models/query_model.py @@ -30,7 +30,7 @@ class GitHubFile(BaseModel): content: str = Field(..., description="Content of the file") filename: str = Field(..., description="Filename including extension") repository: str = Field(default="test-repo-for-app", description="Repository name for github") - username: str = Field(..., description="Username of the repository owner in github") + username: str = Field(default=None, description="Username of the repository owner in github") message: str committer: dict diff --git a/requirements.txt b/requirements.txt index d97f813..3ad280a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,13 +5,13 @@ async-timeout==4.0.2 attrs==23.1.0 Authlib==1.3.0 CacheControl==0.13.1 -certifi==2022.12.7 +certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.1.0 click==8.1.3 colorama==0.4.6 coverage==7.2.7 -cryptography==41.0.7 +cryptography==42.0.2 cyclonedx-python-lib==4.0.1 dataclasses-json==0.5.9 defusedxml==0.7.1