This commit is contained in:
fengchuanhn@gmail.com
2026-05-21 17:19:32 +08:00
parent 13c8493e4c
commit 79b657941f
6 changed files with 296 additions and 28 deletions

View File

@@ -5,7 +5,7 @@ from fastapi import APIRouter
from app.dependencies import OemUser, DbSession
from app.schemas.admin_oem_branding import OemBrandingOut, OemBrandingUpdate
from app.schemas.common import ApiResponse
from app.services import admin_oem_branding as branding_service
from app.services import oem_oem_branding as branding_service
router = APIRouter(prefix="/oem/oem-branding", tags=["管理-OEM品牌"])
@@ -17,7 +17,7 @@ async def get_oem_branding(
) -> ApiResponse[OemBrandingOut]:
try:
oem = await branding_service.get_default_oem_branding(
db, owner_user_id=admin.id
db, oem_id=1,user_id=admin.id
)
except branding_service.AdminOemBrandingError as exc:
return ApiResponse(ok=False, message=exc.message)
@@ -37,7 +37,7 @@ async def update_oem_branding(
) -> ApiResponse[OemBrandingOut]:
try:
oem = await branding_service.update_default_oem_branding(
db, body, owner_user_id=admin.id
db, body, oem_id=admin.id,user_id=admin.id
)
except branding_service.AdminOemBrandingError as exc:
return ApiResponse(ok=False, message=exc.message)