Files
yaoyaoai/app/api/v1/app_config.py
fengchuanhn@gmail.com 3db327d93b 22
2026-05-17 12:54:13 +08:00

20 lines
643 B
Python

"""已登录用户拉取 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)