diff --git a/app/api/routers/rbac_operator.py b/app/api/routers/rbac_operator.py index 57aa199..3cda834 100644 --- a/app/api/routers/rbac_operator.py +++ b/app/api/routers/rbac_operator.py @@ -202,6 +202,18 @@ async def list_content( return await db.content.list(ctype=ctype, status=status) +@router.get("/content/{content_id}", summary="内容详情(编辑回填)") +async def get_content( + content_id: str, + db: Database = Depends(get_db), + _u: dict = Depends(require_roles("operator")), +): + item = await db.content.get(content_id) + if item is None: + raise HTTPException(status_code=404, detail="Content not found") + return item + + @router.post("/content", summary="创建内容") async def create_content( req: ContentCreateRequest,