feat 获取版本号API
This commit is contained in:
parent
fb8b0c29df
commit
66e1829e64
@ -16,6 +16,7 @@ from app.db.systemconfig_oper import SystemConfigOper
|
|||||||
from app.helper.message import MessageHelper
|
from app.helper.message import MessageHelper
|
||||||
from app.helper.progress import ProgressHelper
|
from app.helper.progress import ProgressHelper
|
||||||
from app.utils.http import RequestUtils
|
from app.utils.http import RequestUtils
|
||||||
|
from version import APP_VERSION
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
@ -25,10 +26,14 @@ def get_setting(_: schemas.TokenPayload = Depends(verify_token)):
|
|||||||
"""
|
"""
|
||||||
查询系统环境变量
|
查询系统环境变量
|
||||||
"""
|
"""
|
||||||
return schemas.Response(success=True,
|
info = settings.dict(
|
||||||
data=settings.dict(
|
|
||||||
exclude={"SECRET_KEY", "SUPERUSER_PASSWORD", "API_TOKEN"}
|
exclude={"SECRET_KEY", "SUPERUSER_PASSWORD", "API_TOKEN"}
|
||||||
))
|
)
|
||||||
|
info.update({
|
||||||
|
"VERSION": APP_VERSION
|
||||||
|
})
|
||||||
|
return schemas.Response(success=True,
|
||||||
|
data=info)
|
||||||
|
|
||||||
|
|
||||||
@router.get("/progress/{process_type}", summary="实时进度")
|
@router.get("/progress/{process_type}", summary="实时进度")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user