1
This commit is contained in:
@@ -3,6 +3,7 @@ use crate::*;
|
||||
const ASSET_HISTORY_MAX_LIMIT: usize = 120;
|
||||
const ASSET_HISTORY_CHARACTER_VISUAL_KIND: &str = "character_visual";
|
||||
const ASSET_HISTORY_SCENE_IMAGE_KIND: &str = "scene_image";
|
||||
const ASSET_HISTORY_PUZZLE_COVER_IMAGE_KIND: &str = "puzzle_cover_image";
|
||||
|
||||
#[spacetimedb::table(
|
||||
accessor = asset_object,
|
||||
@@ -199,8 +200,11 @@ fn list_asset_history(
|
||||
let asset_kind = input.asset_kind.trim();
|
||||
if asset_kind != ASSET_HISTORY_CHARACTER_VISUAL_KIND
|
||||
&& asset_kind != ASSET_HISTORY_SCENE_IMAGE_KIND
|
||||
&& asset_kind != ASSET_HISTORY_PUZZLE_COVER_IMAGE_KIND
|
||||
{
|
||||
return Err("历史素材类型只支持 character_visual 或 scene_image".to_string());
|
||||
return Err(
|
||||
"历史素材类型只支持 character_visual、scene_image 或 puzzle_cover_image".to_string(),
|
||||
);
|
||||
}
|
||||
|
||||
let limit = usize::try_from(input.limit)
|
||||
|
||||
Reference in New Issue
Block a user