This commit is contained in:
fengchuanhn@gmail.com
2026-05-21 16:38:11 +08:00
parent 8d5f5f2608
commit 13c8493e4c
8 changed files with 116 additions and 14 deletions

View File

@@ -9,14 +9,14 @@ from app.schemas.admin_desktop_config import (
DesktopConfigUpdate,
)
from app.schemas.common import ApiResponse, PaginatedData
from app.services import admin_desktop_config as config_service
from app.services import oem_desktop_config as config_service
router = APIRouter(prefix="/oem/desktop-configs", tags=["管理-桌面配置"])
@router.get("", response_model=ApiResponse[PaginatedData[DesktopConfigOut]])
async def list_configs(
_admin: OemUser,
_oem: OemUser,
db: DbSession,
page: int = Query(1, ge=1),
page_size: int = Query(
@@ -47,7 +47,7 @@ async def list_configs(
@router.post("", response_model=ApiResponse[DesktopConfigOut])
async def create_config(
body: DesktopConfigCreate,
_admin: OemUser,
_oem: OemUser,
db: DbSession,
) -> ApiResponse[DesktopConfigOut]:
try:
@@ -66,7 +66,7 @@ async def create_config(
async def update_config(
config_id: int,
body: DesktopConfigUpdate,
_admin: OemUser,
_oem: OemUser,
db: DbSession,
) -> ApiResponse[DesktopConfigOut]:
try:
@@ -84,7 +84,7 @@ async def update_config(
@router.delete("/{config_id}", response_model=ApiResponse[None])
async def delete_config(
config_id: int,
_admin: OemUser,
_oem: OemUser,
db: DbSession,
) -> ApiResponse[None]:
try:

View File

@@ -5,6 +5,7 @@ from app.api.v1 import (
oem_card_keys,
agent_card_keys,
admin_desktop_configs,
oem_desktop_configs,
admin_oem_branding,
oem_oem_branding,