Commit 05c0dce5 authored by Yakubov, Sergey's avatar Yakubov, Sergey
Browse files

folder structure, tests

parent a297baa0
Loading
Loading
Loading
Loading
Loading

app/__init__.py

0 → 100644
+0 −0

Empty file added.

app/common.py

0 → 100644
+5 −0
Original line number Diff line number Diff line
from pydantic import BaseModel


class Response(BaseModel):
    msg: str

app/dependencies.py

0 → 100644
+6 −0
Original line number Diff line number Diff line
from fastapi import Header, HTTPException


async def get_token_header(x_token: str = Header()):
    if x_token != "fake-super-secret-token":
        raise HTTPException(status_code=400, detail="X-Token header invalid")

app/main.py

0 → 100644
+8 −0
Original line number Diff line number Diff line
from fastapi import FastAPI

from app.routers import download, upload

app = FastAPI()

app.include_router(upload.router)
app.include_router(download.router)
+0 −0

Empty file added.

Loading