diff --git a/Cargo.lock b/Cargo.lock index b000f9741..475946d6e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2549,6 +2549,7 @@ dependencies = [ "lemmy_db_views", "lemmy_db_views_actor", "lemmy_utils", + "regex", "serde", "serde_json", "serde_with", diff --git a/crates/db_views/src/structs.rs b/crates/db_views/src/structs.rs index cb80c5a2d..0e3bbe6f4 100644 --- a/crates/db_views/src/structs.rs +++ b/crates/db_views/src/structs.rs @@ -282,6 +282,8 @@ pub struct ReportCombinedViewInternal { #[derive(Debug, PartialEq, Serialize, Deserialize, Clone)] #[cfg_attr(feature = "full", derive(TS))] #[cfg_attr(feature = "full", ts(export))] +// Use serde's internal tagging, to work easier with javascript libraries +#[serde(tag = "type_")] pub enum ReportCombinedView { Post(PostReportView), Comment(CommentReportView),