fix: its value not content

This commit is contained in:
əlemi 2024-07-15 21:15:29 +02:00
parent 4ea7c4b0fe
commit 0873ff46f8
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -7,7 +7,7 @@ use crate::ext::{JsonVec, TypeName};
#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] #[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct Field { pub struct Field {
pub name: String, pub name: String,
pub content: String, pub value: String,
pub verified_at: Option<ChronoDateTimeUtc>, pub verified_at: Option<ChronoDateTimeUtc>,
#[serde(rename = "type")] #[serde(rename = "type")]
@ -24,7 +24,7 @@ impl<T: apb::Object> From<T> for Field {
fn from(value: T) -> Self { fn from(value: T) -> Self {
Field { Field {
name: value.name().str().unwrap_or_default(), name: value.name().str().unwrap_or_default(),
content: value.content().str().unwrap_or_default(), value: value.content().str().unwrap_or_default(),
field_type: "PropertyValue".to_string(), // TODO can we try parsing this instead?? field_type: "PropertyValue".to_string(), // TODO can we try parsing this instead??
verified_at: None, // TODO where does verified_at come from? extend apb maybe verified_at: None, // TODO where does verified_at come from? extend apb maybe
} }