fix: 按契约显示统一创作表头
This commit is contained in:
@@ -12,7 +12,7 @@ use crate::format_utc_micros;
|
||||
use shared_contracts::creation_entry_config::{
|
||||
CreationEntryConfigResponse, CreationEntryEventBannerResponse, CreationEntryStartCardResponse,
|
||||
CreationEntryTypeModalResponse, CreationEntryTypeResponse,
|
||||
encode_unified_creation_spec_response, resolve_unified_creation_spec_response_with_entry_title,
|
||||
encode_unified_creation_spec_response, resolve_unified_creation_spec_response,
|
||||
};
|
||||
|
||||
/// 将创作入口领域快照转换为前后台共享的 HTTP 契约响应。
|
||||
@@ -45,9 +45,8 @@ pub fn build_creation_entry_config_response(
|
||||
.creation_types
|
||||
.into_iter()
|
||||
.map(|item| {
|
||||
let unified_creation_spec = resolve_unified_creation_spec_response_with_entry_title(
|
||||
let unified_creation_spec = resolve_unified_creation_spec_response(
|
||||
item.id.as_str(),
|
||||
item.title.as_str(),
|
||||
item.unified_creation_spec_json.as_deref(),
|
||||
);
|
||||
CreationEntryTypeResponse {
|
||||
|
||||
@@ -494,7 +494,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn creation_entry_response_uses_entry_title_for_legacy_unified_creation_title() {
|
||||
fn creation_entry_response_uses_unified_creation_contract_title() {
|
||||
let response = build_creation_entry_config_response(CreationEntryConfigSnapshot {
|
||||
config_id: CREATION_ENTRY_CONFIG_GLOBAL_ID.to_string(),
|
||||
start_card: CreationEntryStartCardSnapshot {
|
||||
@@ -543,7 +543,7 @@ mod tests {
|
||||
.unified_creation_spec
|
||||
.as_ref()
|
||||
.map(|spec| spec.title.as_str()),
|
||||
Some("定制拼图")
|
||||
Some("想做个什么玩法?")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user