feat: implement allow_binary content filtering for item endpoints

Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-25 18:31:20 -03:00
parent 71b29d1def
commit fd61b66a97
2 changed files with 45 additions and 8 deletions

View File

@@ -106,10 +106,14 @@ pub struct ItemContentInfo {
#[derive(Debug, Deserialize)]
pub struct TagsQuery {
pub tags: Option<String>,
#[serde(default)]
#[serde(default = "default_allow_binary")]
pub allow_binary: bool,
}
fn default_allow_binary() -> bool {
true
}
#[derive(Debug, Deserialize)]
pub struct ListItemsQuery {
pub tags: Option<String>,
@@ -120,7 +124,7 @@ pub struct ListItemsQuery {
#[derive(Debug, Deserialize)]
pub struct ItemQuery {
#[serde(default)]
#[serde(default = "default_allow_binary")]
pub allow_binary: bool,
}