desktop修正
This commit is contained in:
@@ -10,6 +10,16 @@ app = FastAPI(
|
||||
title="日本小規模企業向け会計システム"
|
||||
)
|
||||
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"], # 本地开发先用 *
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
@app.exception_handler(ValidationError)
|
||||
async def validation_exception_handler(request: Request, exc: ValidationError):
|
||||
# ここでは最初のエラーだけ簡潔に返す(必要に応じて整形)
|
||||
@@ -45,3 +55,13 @@ app.include_router(trial_balance_router)
|
||||
from app.modules.opening_balances.router import router as opening_router
|
||||
app.include_router(opening_router)
|
||||
|
||||
from app.modules.general_ledger.router import router as general_ledger_router
|
||||
app.include_router(general_ledger_router)
|
||||
|
||||
from app.modules.opening_balances.lock_router import router as opening_balance_lock_router
|
||||
app.include_router(opening_balance_lock_router)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user