File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 66from backend .app .admin .service .auth_service import auth_service
77from backend .common .security .jwt import DependsJwtAuth
88from backend .common .response .response_schema import response_base , ResponseModel
9- from backend .app .admin .schema .token import GetSwaggerToken , GetLoginToken
9+ from backend .app .admin .schema .token import GetSwaggerToken
1010from backend .app .admin .schema .user import Auth2
1111
1212router = APIRouter ()
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class Settings(BaseSettings):
3838 FASTAPI_DOCS_URL : str | None = f'{ FASTAPI_API_V1_PATH } /docs'
3939 FASTAPI_REDOCS_URL : str | None = f'{ FASTAPI_API_V1_PATH } /redocs'
4040 FASTAPI_OPENAPI_URL : str | None = f'{ FASTAPI_API_V1_PATH } /openapi'
41- FASTAPI_STATIC_FILES : bool = True
41+ FASTAPI_STATIC_FILES : bool = False
4242
4343 @model_validator (mode = 'before' )
4444 @classmethod
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
22# -*- coding: utf-8 -*-
3+ import os .path
34from contextlib import asynccontextmanager
45
56from fastapi import FastAPI , Depends
@@ -94,6 +95,9 @@ def register_static_file(app: FastAPI):
9495 if settings .FASTAPI_STATIC_FILES :
9596 from fastapi .staticfiles import StaticFiles
9697
98+ if not os .path .exists (STATIC_DIR ):
99+ os .makedirs (STATIC_DIR )
100+
97101 app .mount ('/static' , StaticFiles (directory = STATIC_DIR ), name = 'static' )
98102
99103
You can’t perform that action at this time.
0 commit comments