-impl CommentForm {
- pub fn get_ap_id(&self) -> Result<Url, ParseError> {
- Url::parse(&self.ap_id.as_ref().unwrap_or(&"not_a_url".to_string()))
- }
+#[derive(Debug, Clone, Default)]
+#[cfg_attr(feature = "full", derive(AsChangeset))]
+#[cfg_attr(feature = "full", diesel(table_name = comment))]
+pub struct CommentUpdateForm {
+ pub content: Option<String>,
+ pub removed: Option<bool>,
+ // Don't use a default naive_now here, because the create function does a lot of comment updates
+ pub updated: Option<Option<chrono::NaiveDateTime>>,
+ pub deleted: Option<bool>,
+ pub ap_id: Option<DbUrl>,
+ pub local: Option<bool>,
+ pub distinguished: Option<bool>,
+ pub language_id: Option<LanguageId>,