From d8dda440107acc53ef16bec09b31a290f33f7392 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 27 Nov 2024 16:37:05 -0500 Subject: [PATCH] Adding profile. --- crates/api_common/src/reports/post.rs | 1 - crates/api_common/src/reports/private_message.rs | 1 - crates/db_views/src/structs.rs | 2 +- migrations/2024-11-26-115042_add_combined_tables/up.sql | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/api_common/src/reports/post.rs b/crates/api_common/src/reports/post.rs index 25094a22a..1ed62252c 100644 --- a/crates/api_common/src/reports/post.rs +++ b/crates/api_common/src/reports/post.rs @@ -44,7 +44,6 @@ pub struct ListPostReports { /// Only shows the unresolved reports #[cfg_attr(feature = "full", ts(optional))] pub unresolved_only: Option, - // TODO make into tagged enum at some point /// if no community is given, it returns reports for all communities moderated by the auth user #[cfg_attr(feature = "full", ts(optional))] pub community_id: Option, diff --git a/crates/api_common/src/reports/private_message.rs b/crates/api_common/src/reports/private_message.rs index 0eb8100f0..22cd4f975 100644 --- a/crates/api_common/src/reports/private_message.rs +++ b/crates/api_common/src/reports/private_message.rs @@ -36,7 +36,6 @@ pub struct ResolvePrivateMessageReport { #[cfg_attr(feature = "full", derive(TS))] #[cfg_attr(feature = "full", ts(export))] /// List private message reports. -// TODO , perhaps GetReports should be a tagged enum list too. pub struct ListPrivateMessageReports { #[cfg_attr(feature = "full", ts(optional))] pub page: Option, diff --git a/crates/db_views/src/structs.rs b/crates/db_views/src/structs.rs index cbd879157..2ce42fd18 100644 --- a/crates/db_views/src/structs.rs +++ b/crates/db_views/src/structs.rs @@ -261,7 +261,7 @@ pub struct ReportCombinedViewInternal { // Private-message-specific pub private_message_report: Option, pub private_message: Option, - // // Shared + // Shared pub report_creator: Person, pub item_creator: Person, pub community: Option, diff --git a/migrations/2024-11-26-115042_add_combined_tables/up.sql b/migrations/2024-11-26-115042_add_combined_tables/up.sql index 1dd649005..195856fcc 100644 --- a/migrations/2024-11-26-115042_add_combined_tables/up.sql +++ b/migrations/2024-11-26-115042_add_combined_tables/up.sql @@ -2,6 +2,7 @@ -- -- Reports: (comment, post, and private_message) -- Inbox: (Comment replies, post replies, comment mentions, post mentions, private messages) +-- Profile: (Posts and Comments) -- Modlog: (lots of types) -- Search: (community, post, comment, user, url) -- TODO not sure about these two: @@ -40,4 +41,3 @@ SELECT FROM private_message_report; --- TODO do triggers in replaceable schema