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('/')