You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
659 B
Python
20 lines
659 B
Python
from fastapi import FastAPI
|
|
from app.core.config import settings
|
|
from app.core.db import create_db_and_tables
|
|
from app.routers import oauth, gmail, classroom, calendar
|
|
|
|
app = FastAPI(title=settings.APP_NAME)
|
|
|
|
@app.on_event("startup")
|
|
def on_startup():
|
|
create_db_and_tables()
|
|
|
|
@app.get("/health")
|
|
def health():
|
|
return {"status": "ok", "app": settings.APP_NAME}
|
|
|
|
app.include_router(oauth.router, prefix="/auth/google", tags=["auth"])
|
|
app.include_router(gmail.router, prefix="/gmail", tags=["gmail"])
|
|
app.include_router(classroom.router, prefix="/classroom", tags=["classroom"])
|
|
app.include_router(calendar.router, prefix="/calendar", tags=["calendar"])
|