Skip to content

Commit

Permalink
feat 获取版本号API
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Aug 16, 2023
1 parent fb8b0c2 commit 66e1829
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/api/endpoints/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from app.helper.message import MessageHelper
from app.helper.progress import ProgressHelper
from app.utils.http import RequestUtils
from version import APP_VERSION

router = APIRouter()

Expand All @@ -25,10 +26,14 @@ def get_setting(_: schemas.TokenPayload = Depends(verify_token)):
"""
查询系统环境变量
"""
info = settings.dict(
exclude={"SECRET_KEY", "SUPERUSER_PASSWORD", "API_TOKEN"}
)
info.update({
"VERSION": APP_VERSION
})
return schemas.Response(success=True,
data=settings.dict(
exclude={"SECRET_KEY", "SUPERUSER_PASSWORD", "API_TOKEN"}
))
data=info)


@router.get("/progress/{process_type}", summary="实时进度")
Expand Down

0 comments on commit 66e1829

Please sign in to comment.