mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 03:11:32 +00:00
Use internal tagging.
This commit is contained in:
parent
46748210ee
commit
4cac67c099
2 changed files with 3 additions and 0 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -2549,6 +2549,7 @@ dependencies = [
|
||||||
"lemmy_db_views",
|
"lemmy_db_views",
|
||||||
"lemmy_db_views_actor",
|
"lemmy_db_views_actor",
|
||||||
"lemmy_utils",
|
"lemmy_utils",
|
||||||
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_with",
|
"serde_with",
|
||||||
|
|
|
@ -282,6 +282,8 @@ pub struct ReportCombinedViewInternal {
|
||||||
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)]
|
||||||
#[cfg_attr(feature = "full", derive(TS))]
|
#[cfg_attr(feature = "full", derive(TS))]
|
||||||
#[cfg_attr(feature = "full", ts(export))]
|
#[cfg_attr(feature = "full", ts(export))]
|
||||||
|
// Use serde's internal tagging, to work easier with javascript libraries
|
||||||
|
#[serde(tag = "type_")]
|
||||||
pub enum ReportCombinedView {
|
pub enum ReportCombinedView {
|
||||||
Post(PostReportView),
|
Post(PostReportView),
|
||||||
Comment(CommentReportView),
|
Comment(CommentReportView),
|
||||||
|
|
Loading…
Reference in a new issue