feat: add optional allow_binary parameter to item handlers
Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
@@ -69,6 +69,8 @@ pub struct ItemContentInfo {
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct TagsQuery {
|
||||
pub tags: Option<String>,
|
||||
#[serde(default)]
|
||||
pub allow_binary: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
@@ -79,6 +81,12 @@ pub struct ListItemsQuery {
|
||||
pub count: Option<u32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct ItemQuery {
|
||||
#[serde(default)]
|
||||
pub allow_binary: bool,
|
||||
}
|
||||
|
||||
fn check_bearer_auth(auth_str: &str, expected_password: &str) -> bool {
|
||||
auth_str.starts_with("Bearer ") && &auth_str[7..] == expected_password
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user