post_report::{PostReport, PostReportForm},
},
};
-use lemmy_db_views_actor::community_moderator_view::CommunityModeratorView;
+ use lemmy_db_views::{
+ comment_view::CommentQueryBuilder,
+ post_report_view::{PostReportQueryBuilder, PostReportView},
+ post_view::{PostQueryBuilder, PostView},
+ };
++use lemmy_db_views_actor::{
++ community_moderator_view::CommunityModeratorView,
++ community_view::CommunityView,
++};
use lemmy_structs::{blocking, post::*};
use lemmy_utils::{
apub::{make_apub_endpoint, EndpointType},
fn safe_columns_tuple() -> Self::SafeColumns;
}
- fn to_vec(tuple: Vec<Self::DbTuple>) -> Vec<Self>
+ pub trait ViewToVec {
+ type DbTuple;
++ fn from_tuple_to_vec(tuple: Vec<Self::DbTuple>) -> Vec<Self>
+ where
+ Self: Sized;
+ }
+
pub fn get_database_url_from_env() -> Result<String, VarError> {
env::var("LEMMY_DATABASE_URL")
}
post_report_view::PostReportView,
post_view::PostView,
};
-use lemmy_db_views_actor::community_moderator_view::CommunityModeratorView;
++use lemmy_db_views_actor::{
++ community_moderator_view::CommunityModeratorView,
++ community_view::CommunityView,
++};
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Debug)]