login画面追加
This commit is contained in:
@@ -6,7 +6,6 @@ from fastapi.responses import JSONResponse, RedirectResponse
|
||||
from pydantic import ValidationError
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
|
||||
# FastAPI アプリケーション作成
|
||||
app = FastAPI(
|
||||
title="日本小規模企業向け会計システム"
|
||||
@@ -32,13 +31,15 @@ async def validation_exception_handler(request: Request, exc: ValidationError):
|
||||
# ─────────────────────────
|
||||
# ルート(稼働確認)
|
||||
# ─────────────────────────
|
||||
#@app.get("/", include_in_schema=False)
|
||||
#def root():
|
||||
# return RedirectResponse(url="/index.html")
|
||||
|
||||
@app.get("/", include_in_schema=False)
|
||||
def root():
|
||||
return RedirectResponse("/login.html")
|
||||
# ─────────────────────────
|
||||
# ルーター登録(※ 必ず app 定義の後)
|
||||
# ─────────────────────────
|
||||
from app.modules.users.router import router as users_router
|
||||
app.include_router(users_router)
|
||||
|
||||
from app.modules.accounts.router import router as accounts_router
|
||||
app.include_router(accounts_router)
|
||||
|
||||
@@ -139,7 +140,7 @@ print("Frontend path =", frontend_path)
|
||||
if frontend_path.exists():
|
||||
app.mount(
|
||||
"/",
|
||||
StaticFiles(directory=frontend_path, html=True),
|
||||
StaticFiles(directory=frontend_path),
|
||||
name="frontend",
|
||||
)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user