22
This commit is contained in:
19
app/api/v1/app_config.py
Normal file
19
app/api/v1/app_config.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""已登录用户拉取 desktop_configs 表全部键值。"""
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from app.dependencies import CurrentUser, DbSession
|
||||
from app.schemas.app_config import AppConfigMap
|
||||
from app.schemas.common import ApiResponse
|
||||
from app.services import desktop_config as desktop_config_service
|
||||
|
||||
router = APIRouter(prefix="/appConfig", tags=["appConfig"])
|
||||
|
||||
|
||||
@router.get("", response_model=ApiResponse[AppConfigMap])
|
||||
async def get_app_config(
|
||||
_user: CurrentUser,
|
||||
db: DbSession,
|
||||
) -> ApiResponse[AppConfigMap]:
|
||||
items = await desktop_config_service.list_all_as_map(db)
|
||||
return ApiResponse(ok=True, message="", data=items)
|
||||
Reference in New Issue
Block a user