dzr 1 年間 前
コミット
88e311b41f
1 ファイル変更2 行追加4 行削除
  1. 2 4
      build_app.py

+ 2 - 4
build_app.py

@@ -1,5 +1,3 @@
-import os
-
 from fastapi import FastAPI, Request
 from fastapi.openapi.docs import (
     get_redoc_html,
@@ -9,6 +7,7 @@ from fastapi.openapi.docs import (
 from fastapi.responses import JSONResponse
 from fastapi.staticfiles import StaticFiles
 
+import setting
 from exception import ApiException
 from services.limiter import register_limiter
 from services.routers import service_router
@@ -41,8 +40,7 @@ def register_swagger_ui_html(app):
 
 
 def init_app():
-    env = os.getenv("FASTAPI_ENV")
-    if env != "prod":
+    if setting.PLATFORM_ENVIRONMENT != "prod":
         app = FastAPI(title="Captcha", docs_url=None, redoc_url=None)
         register_swagger_ui_html(app)
     else: