API/app/main.py

12 lines
338 B
Python
Executable File

from fastapi import FastAPI, Depends
from app import auth, user, server
from os import getenv
app = FastAPI()
dependencies = list()
if not getenv('DISABLE_AUTH'):
dependencies.append(Depends(auth.authorise))
app.include_router(auth.router)
app.include_router(user.router)
app.include_router(server.router, dependencies=dependencies)