fix: prevent bonkers behavior on PUT (deny_unknown_fields)
This commit is contained in:
parent
26fd000a46
commit
272aef7b08
1 changed files with 2 additions and 6 deletions
|
@ -332,7 +332,7 @@ pub struct InEntry {
|
|||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
#[serde(untagged, deny_unknown_fields)]
|
||||
pub enum PutInput {
|
||||
Entry(InEntry),
|
||||
EntryList(Vec<Entry>),
|
||||
|
@ -436,11 +436,7 @@ pub async fn put_object(
|
|||
|
||||
let label_entry = match &address {
|
||||
Address::Hash(_) | Address::Uuid(_) => None,
|
||||
Address::Attribute(attribute) => Some(Entry {
|
||||
entity: address.clone(),
|
||||
attribute: LABEL_ATTR.to_string(),
|
||||
value: format!("ATTRIBUTE: {attribute}").into(),
|
||||
}),
|
||||
Address::Attribute(_) => None,
|
||||
Address::Url(url) => Some(Entry {
|
||||
entity: address.clone(),
|
||||
attribute: LABEL_ATTR.to_string(),
|
||||
|
|
Loading…
Reference in a new issue