bbs-backend/defs.py

17 lines
365 B
Python
Raw Normal View History

2023-04-14 14:09:47 +00:00
import asyncio
from fastapi import FastAPI
2023-04-14 14:30:18 +00:00
from starlette.middleware.trustedhost import TrustedHostMiddleware
2023-04-14 14:09:47 +00:00
from models.sqlite import Sqlite
loop = asyncio.get_event_loop()
app = FastAPI()
2023-04-14 14:30:18 +00:00
app.add_middleware(
TrustedHostMiddleware, allowed_hosts=["127.0.0.1"]
)
2023-04-14 14:09:47 +00:00
sqlite = Sqlite()
need_auth_routes = []
2023-04-15 13:58:25 +00:00
need_auth_uid_only_routes = []
need_admin_routes = []