pub(crate) async fn sync_asset_refs(
tx: &Transaction<'_>,
post_id: i32,
content_html: &str,
cover_image: Option<&str>,
) -> Result<(), AppError>Expand description
在事务中同步文章的素材引用关联(asset_refs)。
语义镜像 sync_tags:调用方需在事务内先删除旧关联(本函数自带 DELETE),
再按 content_html + cover_image 中出现的 /uploads/ 路径重建。
未登记到 assets 表的路径(如回填前的旧图)静默跳过,由重建索引兜底。