Set default tag type to Hashtag

This commit is contained in:
silverpill 2022-02-15 23:14:39 +00:00
parent 227e3d3729
commit 848de1d685

View file

@ -31,12 +31,14 @@ pub struct Attachment {
pub url: Option<String>,
}
fn default_tag_type() -> String { HASHTAG.to_string() }
#[derive(Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Tag {
pub name: String,
#[serde(rename = "type")]
#[serde(rename = "type", default = "default_tag_type")]
pub tag_type: String,
pub href: Option<String>,