From fea0feb304f6fbf6c7fb964df2aa4e67ce9df44d Mon Sep 17 00:00:00 2001 From: brb Date: Wed, 5 Jul 2023 19:44:47 +0200 Subject: [PATCH] added GiteaRequest class --- app.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app.py b/app.py index 6c9d199..f624430 100644 --- a/app.py +++ b/app.py @@ -4,9 +4,23 @@ import uvicorn from fastapi import FastAPI, Request from dotenv import load_dotenv import logging +from pydantic import BaseModel +from typing import List from utils import handle_request +class GiteaRequest(BaseModel): + ref: str + before: str + after: str + compare_url: str + commits: List[dict] + total_commits: int + head_commit: dict + repository: dict + name: str + full_name: str + app = FastAPI() @app.get('/')