fix(health): 文章列表 API 补充 version 字段
文章列表 ArticleListItem 缺少 version 字段,导致前端提交审核
时 version 为 undefined,请求体序列化为 {},后端报 422。
补充 DTO 字段和 service 映射。
This commit is contained in:
@@ -50,6 +50,7 @@ pub struct ArticleListItem {
|
|||||||
pub category_id: Option<Uuid>,
|
pub category_id: Option<Uuid>,
|
||||||
/// 标签名称列表
|
/// 标签名称列表
|
||||||
pub tags: Vec<String>,
|
pub tags: Vec<String>,
|
||||||
|
pub version: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize, IntoParams)]
|
#[derive(Debug, Clone, Deserialize, IntoParams)]
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ pub async fn list_articles(
|
|||||||
view_count: m.view_count,
|
view_count: m.view_count,
|
||||||
category_id: m.category_id,
|
category_id: m.category_id,
|
||||||
tags,
|
tags,
|
||||||
|
version: m.version,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user