mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-22 19:01:32 +00:00
Moving db_views_actor and _moderator into db_views.
- This is necessary because the combined views use both, and that separation was arbitrary to begin with. db_schema has no such crate separation.
This commit is contained in:
parent
031dc2607e
commit
3721067cce
118 changed files with 741 additions and 931 deletions
47
Cargo.lock
generated
47
Cargo.lock
generated
|
@ -2504,8 +2504,6 @@ dependencies = [
|
|||
"lemmy_api_crud",
|
||||
"lemmy_db_schema",
|
||||
"lemmy_db_views",
|
||||
"lemmy_db_views_actor",
|
||||
"lemmy_db_views_moderator",
|
||||
"lemmy_utils",
|
||||
"pretty_assertions",
|
||||
"serial_test",
|
||||
|
@ -2531,8 +2529,6 @@ dependencies = [
|
|||
"jsonwebtoken",
|
||||
"lemmy_db_schema",
|
||||
"lemmy_db_views",
|
||||
"lemmy_db_views_actor",
|
||||
"lemmy_db_views_moderator",
|
||||
"lemmy_utils",
|
||||
"mime",
|
||||
"mime_guess",
|
||||
|
@ -2568,7 +2564,6 @@ dependencies = [
|
|||
"lemmy_api_common",
|
||||
"lemmy_db_schema",
|
||||
"lemmy_db_views",
|
||||
"lemmy_db_views_actor",
|
||||
"lemmy_utils",
|
||||
"regex",
|
||||
"serde",
|
||||
|
@ -2599,7 +2594,6 @@ dependencies = [
|
|||
"lemmy_api_common",
|
||||
"lemmy_db_schema",
|
||||
"lemmy_db_views",
|
||||
"lemmy_db_views_actor",
|
||||
"lemmy_utils",
|
||||
"moka",
|
||||
"pretty_assertions",
|
||||
|
@ -2688,49 +2682,13 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_with",
|
||||
"serial_test",
|
||||
"strum",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"ts-rs",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_db_views_actor"
|
||||
version = "0.19.6-beta.7"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"diesel",
|
||||
"diesel-async",
|
||||
"i-love-jesus",
|
||||
"lemmy_db_schema",
|
||||
"lemmy_utils",
|
||||
"pretty_assertions",
|
||||
"serde",
|
||||
"serde_with",
|
||||
"serial_test",
|
||||
"strum",
|
||||
"tokio",
|
||||
"ts-rs",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_db_views_moderator"
|
||||
version = "0.19.6-beta.7"
|
||||
dependencies = [
|
||||
"diesel",
|
||||
"diesel-async",
|
||||
"i-love-jesus",
|
||||
"lemmy_db_schema",
|
||||
"lemmy_utils",
|
||||
"pretty_assertions",
|
||||
"serde",
|
||||
"serde_with",
|
||||
"serial_test",
|
||||
"tokio",
|
||||
"ts-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_federate"
|
||||
version = "0.19.6-beta.7"
|
||||
|
@ -2746,7 +2704,7 @@ dependencies = [
|
|||
"lemmy_api_common",
|
||||
"lemmy_apub",
|
||||
"lemmy_db_schema",
|
||||
"lemmy_db_views_actor",
|
||||
"lemmy_db_views",
|
||||
"lemmy_utils",
|
||||
"mockall",
|
||||
"moka",
|
||||
|
@ -2775,7 +2733,6 @@ dependencies = [
|
|||
"lemmy_api_common",
|
||||
"lemmy_db_schema",
|
||||
"lemmy_db_views",
|
||||
"lemmy_db_views_actor",
|
||||
"lemmy_utils",
|
||||
"reqwest 0.12.8",
|
||||
"reqwest-middleware",
|
||||
|
|
|
@ -50,8 +50,6 @@ members = [
|
|||
"crates/db_perf",
|
||||
"crates/db_schema",
|
||||
"crates/db_views",
|
||||
"crates/db_views_actor",
|
||||
"crates/db_views_actor",
|
||||
"crates/routes",
|
||||
"crates/federate",
|
||||
]
|
||||
|
@ -91,8 +89,6 @@ lemmy_db_schema = { version = "=0.19.6-beta.7", path = "./crates/db_schema" }
|
|||
lemmy_api_common = { version = "=0.19.6-beta.7", path = "./crates/api_common" }
|
||||
lemmy_routes = { version = "=0.19.6-beta.7", path = "./crates/routes" }
|
||||
lemmy_db_views = { version = "=0.19.6-beta.7", path = "./crates/db_views" }
|
||||
lemmy_db_views_actor = { version = "=0.19.6-beta.7", path = "./crates/db_views_actor" }
|
||||
lemmy_db_views_moderator = { version = "=0.19.6-beta.7", path = "./crates/db_views_moderator" }
|
||||
lemmy_federate = { version = "=0.19.6-beta.7", path = "./crates/federate" }
|
||||
activitypub_federation = { version = "0.6.1", default-features = false, features = [
|
||||
"actix-web",
|
||||
|
|
|
@ -9,7 +9,7 @@ then
|
|||
fi
|
||||
|
||||
export RUST_BACKTRACE=1
|
||||
export RUST_LOG="warn,lemmy_server=$LEMMY_LOG_LEVEL,lemmy_federate=$LEMMY_LOG_LEVEL,lemmy_api=$LEMMY_LOG_LEVEL,lemmy_api_common=$LEMMY_LOG_LEVEL,lemmy_api_crud=$LEMMY_LOG_LEVEL,lemmy_apub=$LEMMY_LOG_LEVEL,lemmy_db_schema=$LEMMY_LOG_LEVEL,lemmy_db_views=$LEMMY_LOG_LEVEL,lemmy_db_views_actor=$LEMMY_LOG_LEVEL,lemmy_db_views_moderator=$LEMMY_LOG_LEVEL,lemmy_routes=$LEMMY_LOG_LEVEL,lemmy_utils=$LEMMY_LOG_LEVEL,lemmy_websocket=$LEMMY_LOG_LEVEL"
|
||||
export RUST_LOG="warn,lemmy_server=$LEMMY_LOG_LEVEL,lemmy_federate=$LEMMY_LOG_LEVEL,lemmy_api=$LEMMY_LOG_LEVEL,lemmy_api_common=$LEMMY_LOG_LEVEL,lemmy_api_crud=$LEMMY_LOG_LEVEL,lemmy_apub=$LEMMY_LOG_LEVEL,lemmy_db_schema=$LEMMY_LOG_LEVEL,lemmy_db_views=$LEMMY_LOG_LEVEL,lemmy_routes=$LEMMY_LOG_LEVEL,lemmy_utils=$LEMMY_LOG_LEVEL,lemmy_websocket=$LEMMY_LOG_LEVEL"
|
||||
|
||||
export LEMMY_TEST_FAST_FEDERATION=1 # by default, the persistent federation queue has delays in the scale of 30s-5min
|
||||
|
||||
|
|
|
@ -21,8 +21,6 @@ workspace = true
|
|||
lemmy_utils = { workspace = true }
|
||||
lemmy_db_schema = { workspace = true, features = ["full"] }
|
||||
lemmy_db_views = { workspace = true, features = ["full"] }
|
||||
lemmy_db_views_moderator = { workspace = true, features = ["full"] }
|
||||
lemmy_db_views_actor = { workspace = true, features = ["full"] }
|
||||
lemmy_api_common = { workspace = true, features = ["full"] }
|
||||
activitypub_federation = { workspace = true }
|
||||
bcrypt = { workspace = true }
|
||||
|
|
|
@ -14,8 +14,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::{Crud, Joinable},
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::CommunityModeratorView;
|
||||
use lemmy_db_views::structs::{CommunityModeratorView, LocalUserView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -24,8 +24,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::{Bannable, Crud, Followable},
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::PersonView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PersonView};
|
||||
use lemmy_utils::{
|
||||
error::{LemmyErrorExt, LemmyErrorType, LemmyResult},
|
||||
utils::validation::is_valid_body_field,
|
||||
|
|
|
@ -12,8 +12,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::{Blockable, Followable},
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::CommunityView;
|
||||
use lemmy_db_views::structs::{CommunityView, LocalUserView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -14,8 +14,7 @@ use lemmy_db_schema::{
|
|||
traits::{Crud, Followable},
|
||||
CommunityVisibility,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::{CommunityPersonBanView, CommunityView};
|
||||
use lemmy_db_views::structs::{CommunityPersonBanView, CommunityView, LocalUserView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -4,8 +4,7 @@ use lemmy_api_common::{
|
|||
context::LemmyContext,
|
||||
utils::is_mod_or_admin,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::CommunityFollowerView;
|
||||
use lemmy_db_views::structs::{CommunityFollowerView, LocalUserView};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
pub async fn get_pending_follows_count(
|
||||
|
|
|
@ -4,8 +4,7 @@ use lemmy_api_common::{
|
|||
context::LemmyContext,
|
||||
utils::check_community_mod_of_any_or_admin_action,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::CommunityFollowerView;
|
||||
use lemmy_db_views::structs::{CommunityFollowerView, LocalUserView};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
pub async fn get_pending_follows_list(
|
||||
|
|
|
@ -10,8 +10,7 @@ use lemmy_db_schema::source::{
|
|||
community::Community,
|
||||
local_site::LocalSite,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::CommunityView;
|
||||
use lemmy_db_views::structs::{CommunityView, LocalUserView};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -12,8 +12,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::{Crud, Joinable},
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView};
|
||||
use lemmy_db_views::structs::{CommunityModeratorView, CommunityView, LocalUserView};
|
||||
use lemmy_utils::{
|
||||
error::{LemmyErrorExt, LemmyErrorType, LemmyResult},
|
||||
location_info,
|
||||
|
|
|
@ -11,8 +11,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::PersonView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PersonView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -16,8 +16,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::PersonView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PersonView};
|
||||
use lemmy_utils::{
|
||||
error::{LemmyErrorExt, LemmyErrorType, LemmyResult},
|
||||
utils::validation::is_valid_body_field,
|
||||
|
|
|
@ -7,8 +7,7 @@ use lemmy_db_schema::{
|
|||
source::person_block::{PersonBlock, PersonBlockForm},
|
||||
traits::Blockable,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::PersonView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PersonView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use actix_web::web::{Data, Json};
|
||||
use lemmy_api_common::{context::LemmyContext, person::BannedPersonsResponse, utils::is_admin};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::PersonView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PersonView};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
pub async fn list_banned_users(
|
||||
|
|
|
@ -6,7 +6,7 @@ use lemmy_api_common::{
|
|||
utils::check_private_instance,
|
||||
};
|
||||
use lemmy_db_views::{
|
||||
person_saved_combined_view::PersonSavedCombinedQuery,
|
||||
combined::person_saved_combined_view::PersonSavedCombinedQuery,
|
||||
structs::{LocalUserView, SiteView},
|
||||
};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
|
|
@ -3,8 +3,7 @@ use lemmy_api_common::{
|
|||
context::LemmyContext,
|
||||
person::{ListInbox, ListInboxResponse},
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::inbox_combined_view::InboxCombinedQuery;
|
||||
use lemmy_db_views::{combined::inbox_combined_view::InboxCombinedQuery, structs::LocalUserView};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -7,8 +7,7 @@ use lemmy_db_schema::{
|
|||
source::person_comment_mention::{PersonCommentMention, PersonCommentMentionUpdateForm},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::PersonCommentMentionView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PersonCommentMentionView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -7,8 +7,7 @@ use lemmy_db_schema::{
|
|||
source::person_post_mention::{PersonPostMention, PersonPostMentionUpdateForm},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::PersonPostMentionView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PersonPostMentionView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -7,8 +7,7 @@ use lemmy_db_schema::{
|
|||
source::comment_reply::{CommentReply, CommentReplyUpdateForm},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::CommentReplyView;
|
||||
use lemmy_db_views::structs::{CommentReplyView, LocalUserView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use actix_web::web::{Data, Json};
|
||||
use lemmy_api_common::{context::LemmyContext, person::GetUnreadCountResponse};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::InboxCombinedViewInternal;
|
||||
use lemmy_db_views::structs::{InboxCombinedViewInternal, LocalUserView};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -7,8 +7,7 @@ use lemmy_db_schema::{
|
|||
source::private_message::{PrivateMessage, PrivateMessageUpdateForm},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::PrivateMessageView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PrivateMessageView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -4,7 +4,7 @@ use lemmy_api_common::{
|
|||
reports::combined::{ListReports, ListReportsResponse},
|
||||
utils::check_community_mod_of_any_or_admin_action,
|
||||
};
|
||||
use lemmy_db_views::{report_combined_view::ReportCombinedQuery, structs::LocalUserView};
|
||||
use lemmy_db_views::{combined::report_combined_view::ReportCombinedQuery, structs::LocalUserView};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
/// Lists reports for a community if an id is supplied
|
||||
|
|
|
@ -12,8 +12,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::{LocalUserView, SiteView};
|
||||
use lemmy_db_views_actor::structs::PersonView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PersonView, SiteView};
|
||||
use lemmy_utils::{
|
||||
error::{LemmyErrorType, LemmyResult},
|
||||
VERSION,
|
||||
|
|
|
@ -5,8 +5,7 @@ use lemmy_api_common::{
|
|||
utils::{check_community_mod_of_any_or_admin_action, check_private_instance},
|
||||
};
|
||||
use lemmy_db_schema::source::local_site::LocalSite;
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_moderator::{self, modlog_combined_view::ModlogCombinedQuery};
|
||||
use lemmy_db_views::{combined::modlog_combined_view::ModlogCombinedQuery, structs::LocalUserView};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -17,8 +17,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::CommunityModeratorView;
|
||||
use lemmy_db_views::structs::{CommunityModeratorView, LocalUserView};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -7,7 +7,7 @@ use lemmy_api_common::{
|
|||
};
|
||||
use lemmy_db_schema::source::local_site::LocalSite;
|
||||
use lemmy_db_views::{
|
||||
registration_application_view::RegistrationApplicationQuery,
|
||||
registration_applications::registration_application_view::RegistrationApplicationQuery,
|
||||
structs::LocalUserView,
|
||||
};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
|
|
@ -21,8 +21,6 @@ full = [
|
|||
"tracing",
|
||||
"rosetta-i18n",
|
||||
"lemmy_db_views/full",
|
||||
"lemmy_db_views_actor/full",
|
||||
"lemmy_db_views_moderator/full",
|
||||
"lemmy_utils/full",
|
||||
"activitypub_federation",
|
||||
"encoding_rs",
|
||||
|
@ -41,8 +39,6 @@ full = [
|
|||
|
||||
[dependencies]
|
||||
lemmy_db_views = { workspace = true }
|
||||
lemmy_db_views_moderator = { workspace = true }
|
||||
lemmy_db_views_actor = { workspace = true }
|
||||
lemmy_db_schema = { workspace = true }
|
||||
lemmy_utils = { workspace = true }
|
||||
activitypub_federation = { workspace = true, optional = true }
|
||||
|
|
|
@ -25,8 +25,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::{CommentView, LocalUserView, PostView};
|
||||
use lemmy_db_views_actor::structs::CommunityView;
|
||||
use lemmy_db_views::structs::{CommentView, CommunityView, LocalUserView, PostView};
|
||||
use lemmy_utils::{
|
||||
error::LemmyResult,
|
||||
utils::{markdown::markdown_to_html, mention::MentionData},
|
||||
|
|
|
@ -4,7 +4,7 @@ use lemmy_db_schema::{
|
|||
CommunityVisibility,
|
||||
ListingType,
|
||||
};
|
||||
use lemmy_db_views_actor::structs::{
|
||||
use lemmy_db_views::structs::{
|
||||
CommunityModeratorView,
|
||||
CommunitySortType,
|
||||
CommunityView,
|
||||
|
|
|
@ -23,8 +23,6 @@ pub mod utils;
|
|||
|
||||
pub extern crate lemmy_db_schema;
|
||||
pub extern crate lemmy_db_views;
|
||||
pub extern crate lemmy_db_views_actor;
|
||||
pub extern crate lemmy_db_views_moderator;
|
||||
pub extern crate lemmy_utils;
|
||||
|
||||
pub use lemmy_utils::error::LemmyErrorType;
|
||||
|
|
|
@ -16,18 +16,16 @@ use lemmy_db_schema::{
|
|||
PostSortType,
|
||||
};
|
||||
use lemmy_db_views::structs::{
|
||||
LocalImageView,
|
||||
PersonContentCombinedPaginationCursor,
|
||||
PersonContentCombinedView,
|
||||
PersonSavedCombinedPaginationCursor,
|
||||
};
|
||||
use lemmy_db_views_actor::structs::{
|
||||
CommentReplyView,
|
||||
CommunityModeratorView,
|
||||
InboxCombinedPaginationCursor,
|
||||
InboxCombinedView,
|
||||
LocalImageView,
|
||||
PersonCommentMentionView,
|
||||
PersonContentCombinedPaginationCursor,
|
||||
PersonContentCombinedView,
|
||||
PersonPostMentionView,
|
||||
PersonSavedCombinedPaginationCursor,
|
||||
PersonView,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
|
@ -4,8 +4,13 @@ use lemmy_db_schema::{
|
|||
PostFeatureType,
|
||||
PostSortType,
|
||||
};
|
||||
use lemmy_db_views::structs::{PaginationCursor, PostView, VoteView};
|
||||
use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView};
|
||||
use lemmy_db_views::structs::{
|
||||
CommunityModeratorView,
|
||||
CommunityView,
|
||||
PaginationCursor,
|
||||
PostView,
|
||||
VoteView,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
#[cfg(feature = "full")]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use lemmy_db_schema::newtypes::{PersonId, PrivateMessageId};
|
||||
use lemmy_db_views_actor::structs::PrivateMessageView;
|
||||
use lemmy_db_views::structs::PrivateMessageView;
|
||||
use serde::{Deserialize, Serialize};
|
||||
#[cfg(feature = "full")]
|
||||
use ts_rs::TS;
|
||||
|
|
|
@ -11,7 +11,7 @@ use lemmy_db_schema::{
|
|||
private_message::PrivateMessage,
|
||||
},
|
||||
};
|
||||
use lemmy_db_views_actor::structs::PrivateMessageView;
|
||||
use lemmy_db_views::structs::PrivateMessageView;
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
use std::sync::{LazyLock, OnceLock};
|
||||
use tokio::{
|
||||
|
|
|
@ -31,18 +31,17 @@ use lemmy_db_schema::{
|
|||
};
|
||||
use lemmy_db_views::structs::{
|
||||
CommentView,
|
||||
CommunityFollowerView,
|
||||
CommunityModeratorView,
|
||||
CommunityView,
|
||||
LocalUserView,
|
||||
ModlogCombinedPaginationCursor,
|
||||
ModlogCombinedView,
|
||||
PersonView,
|
||||
PostView,
|
||||
RegistrationApplicationView,
|
||||
SiteView,
|
||||
};
|
||||
use lemmy_db_views_actor::structs::{
|
||||
CommunityFollowerView,
|
||||
CommunityModeratorView,
|
||||
CommunityView,
|
||||
PersonView,
|
||||
};
|
||||
use lemmy_db_views_moderator::structs::{ModlogCombinedPaginationCursor, ModlogCombinedView};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
#[cfg(feature = "full")]
|
||||
|
|
|
@ -43,14 +43,16 @@ use lemmy_db_schema::{
|
|||
RegistrationMode,
|
||||
};
|
||||
use lemmy_db_views::{
|
||||
comment_view::CommentQuery,
|
||||
structs::{LocalImageView, LocalUserView, SiteView},
|
||||
};
|
||||
use lemmy_db_views_actor::structs::{
|
||||
CommunityFollowerView,
|
||||
CommunityModeratorView,
|
||||
CommunityPersonBanView,
|
||||
CommunityView,
|
||||
comment::comment_view::CommentQuery,
|
||||
structs::{
|
||||
CommunityFollowerView,
|
||||
CommunityModeratorView,
|
||||
CommunityPersonBanView,
|
||||
CommunityView,
|
||||
LocalImageView,
|
||||
LocalUserView,
|
||||
SiteView,
|
||||
},
|
||||
};
|
||||
use lemmy_utils::{
|
||||
email::{send_email, translations::Lang},
|
||||
|
@ -1190,8 +1192,8 @@ mod tests {
|
|||
},
|
||||
ModlogActionType,
|
||||
};
|
||||
use lemmy_db_views_moderator::{
|
||||
modlog_combined_view::ModlogCombinedQuery,
|
||||
use lemmy_db_views::{
|
||||
combined::modlog_combined_view::ModlogCombinedQuery,
|
||||
structs::ModlogCombinedView,
|
||||
};
|
||||
use pretty_assertions::assert_eq;
|
||||
|
|
|
@ -16,7 +16,6 @@ workspace = true
|
|||
lemmy_utils = { workspace = true, features = ["full"] }
|
||||
lemmy_db_schema = { workspace = true, features = ["full"] }
|
||||
lemmy_db_views = { workspace = true, features = ["full"] }
|
||||
lemmy_db_views_actor = { workspace = true, features = ["full"] }
|
||||
lemmy_api_common = { workspace = true, features = ["full"] }
|
||||
activitypub_federation = { workspace = true }
|
||||
bcrypt = { workspace = true }
|
||||
|
|
|
@ -11,8 +11,7 @@ use lemmy_db_schema::{
|
|||
source::community::{Community, CommunityUpdateForm},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::CommunityModeratorView;
|
||||
use lemmy_db_views::structs::{CommunityModeratorView, LocalUserView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -4,8 +4,10 @@ use lemmy_api_common::{
|
|||
context::LemmyContext,
|
||||
utils::{check_private_instance, is_admin},
|
||||
};
|
||||
use lemmy_db_views::structs::{LocalUserView, SiteView};
|
||||
use lemmy_db_views_actor::community_view::CommunityQuery;
|
||||
use lemmy_db_views::{
|
||||
community::community_view::CommunityQuery,
|
||||
structs::{LocalUserView, SiteView},
|
||||
};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -27,8 +27,7 @@ use lemmy_db_schema::{
|
|||
utils::diesel_url_create,
|
||||
CommunityVisibility,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::CommunityModeratorView;
|
||||
use lemmy_db_views::structs::{CommunityModeratorView, LocalUserView};
|
||||
use lemmy_utils::{
|
||||
error::{LemmyErrorExt, LemmyErrorType, LemmyResult},
|
||||
spawn_try_task,
|
||||
|
|
|
@ -12,10 +12,9 @@ use lemmy_db_schema::{
|
|||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::{
|
||||
post_view::PostQuery,
|
||||
structs::{LocalUserView, PostView, SiteView},
|
||||
post::post_view::PostQuery,
|
||||
structs::{CommunityModeratorView, CommunityView, LocalUserView, PostView, SiteView},
|
||||
};
|
||||
use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView};
|
||||
use lemmy_utils::error::{LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -21,8 +21,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::PrivateMessageView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PrivateMessageView};
|
||||
use lemmy_utils::{
|
||||
error::{LemmyErrorExt, LemmyErrorType, LemmyResult},
|
||||
utils::{markdown::markdown_to_html, validation::is_valid_body_field},
|
||||
|
|
|
@ -9,8 +9,7 @@ use lemmy_db_schema::{
|
|||
source::private_message::{PrivateMessage, PrivateMessageUpdateForm},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::PrivateMessageView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PrivateMessageView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -14,8 +14,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::PrivateMessageView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PrivateMessageView};
|
||||
use lemmy_utils::{
|
||||
error::{LemmyErrorExt, LemmyErrorType, LemmyResult},
|
||||
utils::validation::is_valid_body_field,
|
||||
|
|
|
@ -8,8 +8,7 @@ use lemmy_db_schema::source::{
|
|||
oauth_provider::OAuthProvider,
|
||||
tagline::Tagline,
|
||||
};
|
||||
use lemmy_db_views::structs::{LocalUserView, SiteView};
|
||||
use lemmy_db_views_actor::structs::PersonView;
|
||||
use lemmy_db_views::structs::{LocalUserView, PersonView, SiteView};
|
||||
use lemmy_utils::{build_cache, error::LemmyResult, CacheLock, VERSION};
|
||||
use std::sync::LazyLock;
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@ use lemmy_db_schema::source::{
|
|||
instance_block::InstanceBlock,
|
||||
person_block::PersonBlock,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::{CommunityFollowerView, CommunityModeratorView};
|
||||
use lemmy_db_views::structs::{CommunityFollowerView, CommunityModeratorView, LocalUserView};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -21,7 +21,6 @@ workspace = true
|
|||
lemmy_utils = { workspace = true, features = ["full"] }
|
||||
lemmy_db_schema = { workspace = true, features = ["full"] }
|
||||
lemmy_db_views = { workspace = true, features = ["full"] }
|
||||
lemmy_db_views_actor = { workspace = true, features = ["full"] }
|
||||
lemmy_api_common = { workspace = true, features = ["full"] }
|
||||
activitypub_federation = { workspace = true }
|
||||
diesel = { workspace = true }
|
||||
|
|
|
@ -14,7 +14,7 @@ use activitypub_federation::{
|
|||
};
|
||||
use lemmy_api_common::context::LemmyContext;
|
||||
use lemmy_db_schema::source::activity::ActivitySendTargets;
|
||||
use lemmy_db_views_actor::structs::PrivateMessageView;
|
||||
use lemmy_db_views::structs::PrivateMessageView;
|
||||
use lemmy_utils::error::{LemmyError, LemmyResult};
|
||||
use url::Url;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ use lemmy_db_schema::{
|
|||
traits::Crud,
|
||||
CommunityVisibility,
|
||||
};
|
||||
use lemmy_db_views_actor::structs::{CommunityPersonBanView, CommunityView};
|
||||
use lemmy_db_views::structs::{CommunityPersonBanView, CommunityView};
|
||||
use lemmy_utils::error::{FederationError, LemmyError, LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
use serde::Serialize;
|
||||
use tracing::info;
|
||||
|
|
|
@ -16,7 +16,7 @@ use lemmy_db_schema::{
|
|||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views::{
|
||||
comment_view::CommentQuery,
|
||||
comment::comment_view::CommentQuery,
|
||||
structs::{LocalUserView, SiteView},
|
||||
};
|
||||
use lemmy_utils::error::{LemmyError, LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
|
|
@ -7,7 +7,7 @@ use lemmy_api_common::{
|
|||
utils::check_private_instance,
|
||||
};
|
||||
use lemmy_db_views::{
|
||||
person_content_combined_view::PersonContentCombinedQuery,
|
||||
combined::person_content_combined_view::PersonContentCombinedQuery,
|
||||
structs::{LocalUserView, SiteView},
|
||||
};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
|
|
@ -15,7 +15,7 @@ use lemmy_db_schema::{
|
|||
source::{community::Community, post::PostRead},
|
||||
};
|
||||
use lemmy_db_views::{
|
||||
post_view::PostQuery,
|
||||
post::post_view::PostQuery,
|
||||
structs::{LocalUserView, PaginationCursor, SiteView},
|
||||
};
|
||||
use lemmy_utils::error::{LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
|
|
|
@ -11,8 +11,7 @@ use lemmy_db_schema::source::{
|
|||
community::Community,
|
||||
local_site::LocalSite,
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView};
|
||||
use lemmy_db_views::structs::{CommunityModeratorView, CommunityView, LocalUserView};
|
||||
use lemmy_utils::error::{LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -6,8 +6,7 @@ use lemmy_api_common::{
|
|||
person::{GetPersonDetails, GetPersonDetailsResponse},
|
||||
utils::{check_private_instance, is_admin, read_site_for_actor},
|
||||
};
|
||||
use lemmy_db_views::structs::{LocalUserView, SiteView};
|
||||
use lemmy_db_views_actor::structs::{CommunityModeratorView, PersonView};
|
||||
use lemmy_db_views::structs::{CommunityModeratorView, LocalUserView, PersonView, SiteView};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -11,8 +11,7 @@ use lemmy_api_common::{
|
|||
utils::check_private_instance,
|
||||
};
|
||||
use lemmy_db_schema::{source::local_site::LocalSite, utils::DbPool};
|
||||
use lemmy_db_views::structs::{CommentView, LocalUserView, PostView};
|
||||
use lemmy_db_views_actor::structs::{CommunityView, PersonView};
|
||||
use lemmy_db_views::structs::{CommentView, CommunityView, LocalUserView, PersonView, PostView};
|
||||
use lemmy_utils::error::{LemmyErrorExt2, LemmyErrorType, LemmyResult};
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
|
|
|
@ -8,14 +8,11 @@ use lemmy_api_common::{
|
|||
};
|
||||
use lemmy_db_schema::{source::community::Community, utils::post_to_comment_sort_type, SearchType};
|
||||
use lemmy_db_views::{
|
||||
comment_view::CommentQuery,
|
||||
post_view::PostQuery,
|
||||
structs::{LocalUserView, SiteView},
|
||||
};
|
||||
use lemmy_db_views_actor::{
|
||||
community_view::CommunityQuery,
|
||||
person_view::PersonQuery,
|
||||
structs::CommunitySortType,
|
||||
comment::comment_view::CommentQuery,
|
||||
community::community_view::CommunityQuery,
|
||||
person::person_view::PersonQuery,
|
||||
post::post_view::PostQuery,
|
||||
structs::{CommunitySortType, LocalUserView, SiteView},
|
||||
};
|
||||
use lemmy_utils::error::LemmyResult;
|
||||
|
||||
|
|
|
@ -323,8 +323,7 @@ pub(crate) mod tests {
|
|||
},
|
||||
traits::{Crud, Followable},
|
||||
};
|
||||
use lemmy_db_views::structs::LocalUserView;
|
||||
use lemmy_db_views_actor::structs::CommunityFollowerView;
|
||||
use lemmy_db_views::structs::{CommunityFollowerView, LocalUserView};
|
||||
use lemmy_utils::error::{LemmyErrorType, LemmyResult};
|
||||
use serial_test::serial;
|
||||
use std::time::Duration;
|
||||
|
|
|
@ -10,7 +10,7 @@ use activitypub_federation::{
|
|||
};
|
||||
use lemmy_api_common::{context::LemmyContext, utils::generate_followers_url};
|
||||
use lemmy_db_schema::aggregates::structs::CommunityAggregates;
|
||||
use lemmy_db_views_actor::structs::CommunityFollowerView;
|
||||
use lemmy_db_views::structs::CommunityFollowerView;
|
||||
use lemmy_utils::error::LemmyError;
|
||||
use url::Url;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ use lemmy_db_schema::{
|
|||
source::community::{CommunityModerator, CommunityModeratorForm},
|
||||
traits::Joinable,
|
||||
};
|
||||
use lemmy_db_views_actor::structs::CommunityModeratorView;
|
||||
use lemmy_db_views::structs::CommunityModeratorView;
|
||||
use lemmy_utils::error::{LemmyError, LemmyResult};
|
||||
use url::Url;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ use activitypub_federation::{
|
|||
use futures::future::join_all;
|
||||
use lemmy_api_common::{context::LemmyContext, utils::generate_outbox_url};
|
||||
use lemmy_db_schema::{source::site::Site, utils::FETCH_LIMIT_MAX, PostSortType};
|
||||
use lemmy_db_views::post_view::PostQuery;
|
||||
use lemmy_db_views::post::post_view::PostQuery;
|
||||
use lemmy_utils::error::{LemmyError, LemmyResult};
|
||||
use url::Url;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ use actix_web::{
|
|||
};
|
||||
use lemmy_api_common::context::LemmyContext;
|
||||
use lemmy_db_schema::{source::community::Community, traits::ApubActor, CommunityVisibility};
|
||||
use lemmy_db_views_actor::structs::CommunityFollowerView;
|
||||
use lemmy_db_views::structs::CommunityFollowerView;
|
||||
use lemmy_utils::error::{LemmyErrorType, LemmyResult};
|
||||
use serde::Deserialize;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ use lemmy_db_schema::{
|
|||
source::{activity::SentActivity, community::Community},
|
||||
CommunityVisibility,
|
||||
};
|
||||
use lemmy_db_views_actor::structs::CommunityFollowerView;
|
||||
use lemmy_db_views::structs::CommunityFollowerView;
|
||||
use lemmy_utils::error::{FederationError, LemmyErrorExt, LemmyErrorType, LemmyResult};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{ops::Deref, time::Duration};
|
||||
|
|
|
@ -40,7 +40,7 @@ use lemmy_db_schema::{
|
|||
traits::{ApubActor, Crud},
|
||||
CommunityVisibility,
|
||||
};
|
||||
use lemmy_db_views_actor::structs::CommunityFollowerView;
|
||||
use lemmy_db_views::structs::CommunityFollowerView;
|
||||
use lemmy_utils::{
|
||||
error::{LemmyError, LemmyResult},
|
||||
spawn_try_task,
|
||||
|
|
|
@ -36,7 +36,7 @@ use lemmy_db_schema::{
|
|||
},
|
||||
traits::Crud,
|
||||
};
|
||||
use lemmy_db_views_actor::structs::CommunityModeratorView;
|
||||
use lemmy_db_views::structs::CommunityModeratorView;
|
||||
use lemmy_utils::{
|
||||
error::{LemmyError, LemmyResult},
|
||||
spawn_try_task,
|
||||
|
|
|
@ -22,7 +22,7 @@ use lemmy_db_schema::{
|
|||
utils::{build_db_pool, get_conn, now},
|
||||
PostSortType,
|
||||
};
|
||||
use lemmy_db_views::{post_view::PostQuery, structs::PaginationCursor};
|
||||
use lemmy_db_views::{post::post_view::PostQuery, structs::PaginationCursor};
|
||||
use lemmy_utils::error::{LemmyErrorExt2, LemmyResult};
|
||||
use std::num::NonZeroU32;
|
||||
use url::Url;
|
||||
|
|
|
@ -41,6 +41,7 @@ actix-web = { workspace = true, optional = true }
|
|||
i-love-jesus = { workspace = true, optional = true }
|
||||
chrono = { workspace = true }
|
||||
derive-new.workspace = true
|
||||
strum = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
serial_test = { workspace = true }
|
||||
|
|
|
@ -536,7 +536,7 @@ impl InternalToCombinedView for InboxCombinedViewInternal {
|
|||
#[expect(clippy::indexing_slicing)]
|
||||
mod tests {
|
||||
use crate::{
|
||||
inbox_combined_view::InboxCombinedQuery,
|
||||
combined::inbox_combined_view::InboxCombinedQuery,
|
||||
structs::{InboxCombinedView, InboxCombinedViewInternal, PrivateMessageView},
|
||||
};
|
||||
use lemmy_db_schema::{
|
12
crates/db_views/src/combined/mod.rs
Normal file
12
crates/db_views/src/combined/mod.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
#[cfg(feature = "full")]
|
||||
pub mod inbox_combined_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod modlog_combined_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod person_content_combined_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod person_saved_combined_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod report_combined_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod search_combined_view;
|
|
@ -609,7 +609,7 @@ impl InternalToCombinedView for ModlogCombinedViewInternal {
|
|||
#[expect(clippy::indexing_slicing)]
|
||||
mod tests {
|
||||
|
||||
use crate::{modlog_combined_view::ModlogCombinedQuery, structs::ModlogCombinedView};
|
||||
use crate::{combined::modlog_combined_view::ModlogCombinedQuery, structs::ModlogCombinedView};
|
||||
use lemmy_db_schema::{
|
||||
newtypes::PersonId,
|
||||
source::{
|
|
@ -270,7 +270,7 @@ impl InternalToCombinedView for PersonContentViewInternal {
|
|||
mod tests {
|
||||
|
||||
use crate::{
|
||||
person_content_combined_view::PersonContentCombinedQuery,
|
||||
combined::person_content_combined_view::PersonContentCombinedQuery,
|
||||
structs::PersonContentCombinedView,
|
||||
};
|
||||
use lemmy_db_schema::{
|
|
@ -226,7 +226,7 @@ impl PersonSavedCombinedQuery {
|
|||
mod tests {
|
||||
|
||||
use crate::{
|
||||
person_saved_combined_view::PersonSavedCombinedQuery,
|
||||
combined::person_saved_combined_view::PersonSavedCombinedQuery,
|
||||
structs::{LocalUserView, PersonContentCombinedView},
|
||||
};
|
||||
use lemmy_db_schema::{
|
|
@ -415,7 +415,7 @@ impl InternalToCombinedView for ReportCombinedViewInternal {
|
|||
mod tests {
|
||||
|
||||
use crate::{
|
||||
report_combined_view::ReportCombinedQuery,
|
||||
combined::report_combined_view::ReportCombinedQuery,
|
||||
structs::{
|
||||
CommentReportView,
|
||||
LocalUserView,
|
0
crates/db_views/src/combined/search_combined_view.rs
Normal file
0
crates/db_views/src/combined/search_combined_view.rs
Normal file
|
@ -363,7 +363,7 @@ fn handle_deleted(mut c: CommentView, is_admin: bool) -> CommentView {
|
|||
mod tests {
|
||||
|
||||
use crate::{
|
||||
comment_view::{CommentQuery, CommentSortType, CommentView, DbPool},
|
||||
comment::comment_view::{CommentQuery, CommentSortType, CommentView, DbPool},
|
||||
structs::LocalUserView,
|
||||
};
|
||||
use lemmy_db_schema::{
|
4
crates/db_views/src/comment/mod.rs
Normal file
4
crates/db_views/src/comment/mod.rs
Normal file
|
@ -0,0 +1,4 @@
|
|||
#[cfg(feature = "full")]
|
||||
pub mod comment_reply_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod comment_view;
|
|
@ -266,7 +266,7 @@ impl CommunityQuery<'_> {
|
|||
mod tests {
|
||||
|
||||
use crate::{
|
||||
community_view::CommunityQuery,
|
||||
community::community_view::CommunityQuery,
|
||||
structs::{CommunitySortType, CommunityView},
|
||||
};
|
||||
use lemmy_db_schema::{
|
8
crates/db_views/src/community/mod.rs
Normal file
8
crates/db_views/src/community/mod.rs
Normal file
|
@ -0,0 +1,8 @@
|
|||
#[cfg(feature = "full")]
|
||||
pub mod community_follower_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod community_moderator_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod community_person_ban_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod community_view;
|
|
@ -2,31 +2,23 @@
|
|||
extern crate serial_test;
|
||||
|
||||
#[cfg(feature = "full")]
|
||||
pub mod comment_report_view;
|
||||
pub mod combined;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod comment_view;
|
||||
pub mod comment;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod custom_emoji_view;
|
||||
pub mod community;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod local_image_view;
|
||||
pub mod local_user;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod local_user_view;
|
||||
pub mod person;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod person_content_combined_view;
|
||||
pub mod post;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod person_saved_combined_view;
|
||||
pub mod private_message;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod post_report_view;
|
||||
pub mod registration_applications;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod post_view;
|
||||
pub mod reports;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod private_message_report_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod registration_application_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod report_combined_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod site_view;
|
||||
pub mod site;
|
||||
pub mod structs;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod vote_view;
|
||||
|
|
2
crates/db_views/src/local_user/mod.rs
Normal file
2
crates/db_views/src/local_user/mod.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
#[cfg(feature = "full")]
|
||||
pub mod local_user_view;
|
6
crates/db_views/src/person/mod.rs
Normal file
6
crates/db_views/src/person/mod.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
#[cfg(feature = "full")]
|
||||
pub mod person_comment_mention_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod person_post_mention_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod person_view;
|
2
crates/db_views/src/post/mod.rs
Normal file
2
crates/db_views/src/post/mod.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
#[cfg(feature = "full")]
|
||||
pub mod post_view;
|
|
@ -597,7 +597,7 @@ impl<'a> PostQuery<'a> {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::{
|
||||
post_view::{PaginationCursorData, PostQuery, PostView},
|
||||
post::post_view::{PaginationCursorData, PostQuery, PostView},
|
||||
structs::LocalUserView,
|
||||
};
|
||||
use chrono::Utc;
|
2
crates/db_views/src/private_message/mod.rs
Normal file
2
crates/db_views/src/private_message/mod.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
#[cfg(feature = "full")]
|
||||
pub mod private_message_view;
|
2
crates/db_views/src/registration_applications/mod.rs
Normal file
2
crates/db_views/src/registration_applications/mod.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
#[cfg(feature = "full")]
|
||||
pub mod registration_application_view;
|
|
@ -137,7 +137,7 @@ impl RegistrationApplicationQuery {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
use crate::registration_application_view::{
|
||||
use crate::registration_applications::registration_application_view::{
|
||||
RegistrationApplicationQuery,
|
||||
RegistrationApplicationView,
|
||||
};
|
6
crates/db_views/src/reports/mod.rs
Normal file
6
crates/db_views/src/reports/mod.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
#[cfg(feature = "full")]
|
||||
pub mod comment_report_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod post_report_view;
|
||||
#[cfg(feature = "full")]
|
||||
pub mod private_message_report_view;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue