Merge branch 'bearer-token' of https://github.com/SleeplessOne1917/lemmy into bearer-token

pull/3982/head
SleeplessOne1917 2023-09-22 21:48:47 -04:00
commit 6387ac07b3
155 changed files with 339 additions and 1140 deletions

View File

@ -9,10 +9,7 @@ use lemmy_api_common::{
use lemmy_db_schema::{ use lemmy_db_schema::{
source::{ source::{
community::{ community::{
CommunityFollower, CommunityFollower, CommunityFollowerForm, CommunityPersonBan, CommunityPersonBanForm,
CommunityFollowerForm,
CommunityPersonBan,
CommunityPersonBanForm,
}, },
moderator::{ModBanFromCommunity, ModBanFromCommunityForm}, moderator::{ModBanFromCommunity, ModBanFromCommunityForm},
}, },

View File

@ -5,8 +5,7 @@ use lemmy_api_common::{
utils::password_length_check, utils::password_length_check,
}; };
use lemmy_db_schema::source::{ use lemmy_db_schema::source::{
local_user::LocalUser, local_user::LocalUser, password_reset_request::PasswordResetRequest,
password_reset_request::PasswordResetRequest,
}; };
use lemmy_utils::error::{LemmyError, LemmyErrorExt, LemmyErrorType}; use lemmy_utils::error::{LemmyError, LemmyErrorExt, LemmyErrorType};

View File

@ -2,9 +2,7 @@ use crate::{build_totp_2fa, generate_totp_2fa_secret};
use activitypub_federation::config::Data; use activitypub_federation::config::Data;
use actix_web::web::Json; use actix_web::web::Json;
use lemmy_api_common::{ use lemmy_api_common::{
context::LemmyContext, context::LemmyContext, person::GenerateTotpSecretResponse, sensitive::Sensitive,
person::GenerateTotpSecretResponse,
sensitive::Sensitive,
}; };
use lemmy_db_schema::{ use lemmy_db_schema::{
source::local_user::{LocalUser, LocalUserUpdateForm}, source::local_user::{LocalUser, LocalUserUpdateForm},

View File

@ -1,9 +1,7 @@
use actix_web::web::{Data, Json}; use actix_web::web::{Data, Json};
use lemmy_api_common::{context::LemmyContext, person::GetRepliesResponse}; use lemmy_api_common::{context::LemmyContext, person::GetRepliesResponse};
use lemmy_db_schema::source::{ use lemmy_db_schema::source::{
comment_reply::CommentReply, comment_reply::CommentReply, person_mention::PersonMention, private_message::PrivateMessage,
person_mention::PersonMention,
private_message::PrivateMessage,
}; };
use lemmy_db_views::structs::LocalUserView; use lemmy_db_views::structs::LocalUserView;
use lemmy_utils::error::{LemmyError, LemmyErrorExt, LemmyErrorType}; use lemmy_utils::error::{LemmyError, LemmyErrorExt, LemmyErrorType};

View File

@ -4,10 +4,7 @@ use lemmy_api_common::{
person::{GetReportCount, GetReportCountResponse}, person::{GetReportCount, GetReportCountResponse},
}; };
use lemmy_db_views::structs::{ use lemmy_db_views::structs::{
CommentReportView, CommentReportView, LocalUserView, PostReportView, PrivateMessageReportView,
LocalUserView,
PostReportView,
PrivateMessageReportView,
}; };
use lemmy_utils::error::LemmyError; use lemmy_utils::error::LemmyError;

View File

@ -6,9 +6,7 @@ use lemmy_api_common::{
post::{CreatePostLike, PostResponse}, post::{CreatePostLike, PostResponse},
send_activity::{ActivityChannel, SendActivityData}, send_activity::{ActivityChannel, SendActivityData},
utils::{ utils::{
check_community_ban, check_community_ban, check_community_deleted_or_removed, check_downvotes_enabled,
check_community_deleted_or_removed,
check_downvotes_enabled,
mark_post_as_read, mark_post_as_read,
}, },
}; };

View File

@ -5,8 +5,7 @@ use lemmy_api_common::{
utils::is_admin, utils::is_admin,
}; };
use lemmy_db_views::{ use lemmy_db_views::{
private_message_report_view::PrivateMessageReportQuery, private_message_report_view::PrivateMessageReportQuery, structs::LocalUserView,
structs::LocalUserView,
}; };
use lemmy_utils::error::LemmyError; use lemmy_utils::error::LemmyError;

View File

@ -1,8 +1,6 @@
use actix_web::web::{Data, Json}; use actix_web::web::{Data, Json};
use lemmy_api_common::{ use lemmy_api_common::{
context::LemmyContext, context::LemmyContext, site::GetFederatedInstancesResponse, utils::build_federated_instances,
site::GetFederatedInstancesResponse,
utils::build_federated_instances,
}; };
use lemmy_db_views::structs::SiteView; use lemmy_db_views::structs::SiteView;
use lemmy_utils::error::LemmyError; use lemmy_utils::error::LemmyError;

View File

@ -11,22 +11,10 @@ use lemmy_db_schema::{
}; };
use lemmy_db_views::structs::LocalUserView; use lemmy_db_views::structs::LocalUserView;
use lemmy_db_views_moderator::structs::{ use lemmy_db_views_moderator::structs::{
AdminPurgeCommentView, AdminPurgeCommentView, AdminPurgeCommunityView, AdminPurgePersonView, AdminPurgePostView,
AdminPurgeCommunityView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModFeaturePostView,
AdminPurgePersonView, ModHideCommunityView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView,
AdminPurgePostView, ModRemovePostView, ModTransferCommunityView, ModlogListParams,
ModAddCommunityView,
ModAddView,
ModBanFromCommunityView,
ModBanView,
ModFeaturePostView,
ModHideCommunityView,
ModLockPostView,
ModRemoveCommentView,
ModRemoveCommunityView,
ModRemovePostView,
ModTransferCommunityView,
ModlogListParams,
}; };
use lemmy_utils::error::LemmyError; use lemmy_utils::error::LemmyError;
use ModlogActionType::*; use ModlogActionType::*;

View File

@ -6,8 +6,7 @@ use lemmy_api_common::{
}; };
use lemmy_db_schema::source::local_site::LocalSite; use lemmy_db_schema::source::local_site::LocalSite;
use lemmy_db_views::{ use lemmy_db_views::{
registration_application_view::RegistrationApplicationQuery, registration_application_view::RegistrationApplicationQuery, structs::LocalUserView,
structs::LocalUserView,
}; };
use lemmy_utils::error::LemmyError; use lemmy_utils::error::LemmyError;

View File

@ -1,8 +1,6 @@
use actix_web::web::{Data, Json}; use actix_web::web::{Data, Json};
use lemmy_api_common::{ use lemmy_api_common::{
context::LemmyContext, context::LemmyContext, site::GetUnreadRegistrationApplicationCountResponse, utils::is_admin,
site::GetUnreadRegistrationApplicationCountResponse,
utils::is_admin,
}; };
use lemmy_db_schema::source::local_site::LocalSite; use lemmy_db_schema::source::local_site::LocalSite;
use lemmy_db_views::structs::{LocalUserView, RegistrationApplicationView}; use lemmy_db_views::structs::{LocalUserView, RegistrationApplicationView};

View File

@ -1,7 +1,6 @@
use lemmy_db_schema::{ use lemmy_db_schema::{
newtypes::{CommentId, CommentReportId, CommunityId, LanguageId, LocalUserId, PostId}, newtypes::{CommentId, CommentReportId, CommunityId, LanguageId, LocalUserId, PostId},
CommentSortType, CommentSortType, ListingType,
ListingType,
}; };
use lemmy_db_views::structs::{CommentReportView, CommentView}; use lemmy_db_views::structs::{CommentReportView, CommentView};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@ -1,8 +1,7 @@
use lemmy_db_schema::{ use lemmy_db_schema::{
newtypes::{CommunityId, LanguageId, PersonId}, newtypes::{CommunityId, LanguageId, PersonId},
source::site::Site, source::site::Site,
ListingType, ListingType, SortType,
SortType,
}; };
use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView, PersonView}; use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView, PersonView};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@ -1,16 +1,11 @@
use crate::sensitive::Sensitive; use crate::sensitive::Sensitive;
use lemmy_db_schema::{ use lemmy_db_schema::{
newtypes::{CommentReplyId, CommunityId, LanguageId, PersonId, PersonMentionId}, newtypes::{CommentReplyId, CommunityId, LanguageId, PersonId, PersonMentionId},
CommentSortType, CommentSortType, ListingType, SortType,
ListingType,
SortType,
}; };
use lemmy_db_views::structs::{CommentView, PostView}; use lemmy_db_views::structs::{CommentView, PostView};
use lemmy_db_views_actor::structs::{ use lemmy_db_views_actor::structs::{
CommentReplyView, CommentReplyView, CommunityModeratorView, PersonMentionView, PersonView,
CommunityModeratorView,
PersonMentionView,
PersonView,
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use serde_with::skip_serializing_none; use serde_with::skip_serializing_none;

View File

@ -1,8 +1,6 @@
use lemmy_db_schema::{ use lemmy_db_schema::{
newtypes::{CommentId, CommunityId, DbUrl, LanguageId, PostId, PostReportId}, newtypes::{CommentId, CommunityId, DbUrl, LanguageId, PostId, PostReportId},
ListingType, ListingType, PostFeatureType, SortType,
PostFeatureType,
SortType,
}; };
use lemmy_db_views::structs::{PaginationCursor, PostReportView, PostView}; use lemmy_db_views::structs::{PaginationCursor, PostReportView, PostView};
use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView}; use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView};

View File

@ -302,10 +302,7 @@ mod tests {
#![allow(clippy::indexing_slicing)] #![allow(clippy::indexing_slicing)]
use crate::request::{ use crate::request::{
build_user_agent, build_user_agent, fetch_site_metadata, html_to_site_metadata, SiteMetadata,
fetch_site_metadata,
html_to_site_metadata,
SiteMetadata,
}; };
use lemmy_utils::settings::SETTINGS; use lemmy_utils::settings::SETTINGS;
use url::Url; use url::Url;

View File

@ -9,10 +9,7 @@ use futures::future::BoxFuture;
use lemmy_db_schema::{ use lemmy_db_schema::{
newtypes::{CommunityId, DbUrl, PersonId}, newtypes::{CommunityId, DbUrl, PersonId},
source::{ source::{
comment::Comment, comment::Comment, community::Community, person::Person, post::Post,
community::Community,
person::Person,
post::Post,
private_message::PrivateMessage, private_message::PrivateMessage,
}, },
}; };

View File

@ -1,45 +1,20 @@
use lemmy_db_schema::{ use lemmy_db_schema::{
newtypes::{CommentId, CommunityId, InstanceId, LanguageId, PersonId, PostId}, newtypes::{CommentId, CommunityId, InstanceId, LanguageId, PersonId, PostId},
source::{instance::Instance, language::Language, tagline::Tagline}, source::{instance::Instance, language::Language, tagline::Tagline},
ListingType, ListingType, ModlogActionType, RegistrationMode, SearchType, SortType,
ModlogActionType,
RegistrationMode,
SearchType,
SortType,
}; };
use lemmy_db_views::structs::{ use lemmy_db_views::structs::{
CommentView, CommentView, CustomEmojiView, LocalUserView, PostView, RegistrationApplicationView, SiteView,
CustomEmojiView,
LocalUserView,
PostView,
RegistrationApplicationView,
SiteView,
}; };
use lemmy_db_views_actor::structs::{ use lemmy_db_views_actor::structs::{
CommunityBlockView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView,
CommunityFollowerView, InstanceBlockView, PersonBlockView, PersonView,
CommunityModeratorView,
CommunityView,
InstanceBlockView,
PersonBlockView,
PersonView,
}; };
use lemmy_db_views_moderator::structs::{ use lemmy_db_views_moderator::structs::{
AdminPurgeCommentView, AdminPurgeCommentView, AdminPurgeCommunityView, AdminPurgePersonView, AdminPurgePostView,
AdminPurgeCommunityView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModFeaturePostView,
AdminPurgePersonView, ModHideCommunityView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView,
AdminPurgePostView, ModRemovePostView, ModTransferCommunityView,
ModAddCommunityView,
ModAddView,
ModBanFromCommunityView,
ModBanView,
ModFeaturePostView,
ModHideCommunityView,
ModLockPostView,
ModRemoveCommentView,
ModRemoveCommunityView,
ModRemovePostView,
ModTransferCommunityView,
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use serde_with::skip_serializing_none; use serde_with::skip_serializing_none;

View File

@ -21,9 +21,7 @@ use lemmy_db_schema::{
}; };
use lemmy_db_views::{comment_view::CommentQuery, structs::LocalUserView}; use lemmy_db_views::{comment_view::CommentQuery, structs::LocalUserView};
use lemmy_db_views_actor::structs::{ use lemmy_db_views_actor::structs::{
CommunityModeratorView, CommunityModeratorView, CommunityPersonBanView, CommunityView,
CommunityPersonBanView,
CommunityView,
}; };
use lemmy_utils::{ use lemmy_utils::{
email::{send_email, translations::Lang}, email::{send_email, translations::Lang},

View File

@ -6,13 +6,8 @@ use lemmy_api_common::{
context::LemmyContext, context::LemmyContext,
send_activity::{ActivityChannel, SendActivityData}, send_activity::{ActivityChannel, SendActivityData},
utils::{ utils::{
check_community_ban, check_community_ban, check_community_deleted_or_removed, check_post_deleted_or_removed,
check_community_deleted_or_removed, generate_local_apub_endpoint, get_post, local_site_to_slur_regex, sanitize_html_api,
check_post_deleted_or_removed,
generate_local_apub_endpoint,
get_post,
local_site_to_slur_regex,
sanitize_html_api,
EndpointType, EndpointType,
}, },
}; };
@ -31,9 +26,7 @@ use lemmy_db_views::structs::LocalUserView;
use lemmy_utils::{ use lemmy_utils::{
error::{LemmyError, LemmyErrorExt, LemmyErrorType}, error::{LemmyError, LemmyErrorExt, LemmyErrorType},
utils::{ utils::{
mention::scrape_text_for_mentions, mention::scrape_text_for_mentions, slurs::remove_slurs, validation::is_valid_body_field,
slurs::remove_slurs,
validation::is_valid_body_field,
}, },
}; };

View File

@ -20,9 +20,7 @@ use lemmy_db_views::structs::{CommentView, LocalUserView};
use lemmy_utils::{ use lemmy_utils::{
error::{LemmyError, LemmyErrorExt, LemmyErrorType}, error::{LemmyError, LemmyErrorExt, LemmyErrorType},
utils::{ utils::{
mention::scrape_text_for_mentions, mention::scrape_text_for_mentions, slurs::remove_slurs, validation::is_valid_body_field,
slurs::remove_slurs,
validation::is_valid_body_field,
}, },
}; };

View File

@ -5,26 +5,16 @@ use lemmy_api_common::{
community::{CommunityResponse, CreateCommunity}, community::{CommunityResponse, CreateCommunity},
context::LemmyContext, context::LemmyContext,
utils::{ utils::{
generate_followers_url, generate_followers_url, generate_inbox_url, generate_local_apub_endpoint,
generate_inbox_url, generate_shared_inbox_url, is_admin, local_site_to_slur_regex, sanitize_html_api,
generate_local_apub_endpoint, sanitize_html_api_opt, EndpointType,
generate_shared_inbox_url,
is_admin,
local_site_to_slur_regex,
sanitize_html_api,
sanitize_html_api_opt,
EndpointType,
}, },
}; };
use lemmy_db_schema::{ use lemmy_db_schema::{
source::{ source::{
actor_language::{CommunityLanguage, SiteLanguage}, actor_language::{CommunityLanguage, SiteLanguage},
community::{ community::{
Community, Community, CommunityFollower, CommunityFollowerForm, CommunityInsertForm, CommunityModerator,
CommunityFollower,
CommunityFollowerForm,
CommunityInsertForm,
CommunityModerator,
CommunityModeratorForm, CommunityModeratorForm,
}, },
}, },

View File

@ -7,15 +7,9 @@ use lemmy_api_common::{
request::fetch_site_data, request::fetch_site_data,
send_activity::{ActivityChannel, SendActivityData}, send_activity::{ActivityChannel, SendActivityData},
utils::{ utils::{
check_community_ban, check_community_ban, check_community_deleted_or_removed, generate_local_apub_endpoint,
check_community_deleted_or_removed, honeypot_check, local_site_to_slur_regex, mark_post_as_read, sanitize_html_api,
generate_local_apub_endpoint, sanitize_html_api_opt, EndpointType,
honeypot_check,
local_site_to_slur_regex,
mark_post_as_read,
sanitize_html_api,
sanitize_html_api_opt,
EndpointType,
}, },
}; };
use lemmy_db_schema::{ use lemmy_db_schema::{

View File

@ -5,13 +5,8 @@ use lemmy_api_common::{
private_message::{CreatePrivateMessage, PrivateMessageResponse}, private_message::{CreatePrivateMessage, PrivateMessageResponse},
send_activity::{ActivityChannel, SendActivityData}, send_activity::{ActivityChannel, SendActivityData},
utils::{ utils::{
check_person_block, check_person_block, generate_local_apub_endpoint, get_interface_language,
generate_local_apub_endpoint, local_site_to_slur_regex, sanitize_html_api, send_email_to_user, EndpointType,
get_interface_language,
local_site_to_slur_regex,
sanitize_html_api,
send_email_to_user,
EndpointType,
}, },
}; };
use lemmy_db_schema::{ use lemmy_db_schema::{

View File

@ -5,11 +5,8 @@ use lemmy_api_common::{
context::LemmyContext, context::LemmyContext,
site::{CreateSite, SiteResponse}, site::{CreateSite, SiteResponse},
utils::{ utils::{
generate_site_inbox_url, generate_site_inbox_url, is_admin, local_site_rate_limit_to_rate_limit_config,
is_admin, sanitize_html_api, sanitize_html_api_opt,
local_site_rate_limit_to_rate_limit_config,
sanitize_html_api,
sanitize_html_api_opt,
}, },
}; };
use lemmy_db_schema::{ use lemmy_db_schema::{
@ -29,11 +26,8 @@ use lemmy_utils::{
utils::{ utils::{
slurs::{check_slurs, check_slurs_opt}, slurs::{check_slurs, check_slurs_opt},
validation::{ validation::{
build_and_check_regex, build_and_check_regex, check_site_visibility_valid, is_valid_body_field,
check_site_visibility_valid, site_description_length_check, site_name_length_check,
is_valid_body_field,
site_description_length_check,
site_name_length_check,
}, },
}, },
}; };

View File

@ -10,12 +10,8 @@ use lemmy_db_schema::source::{
}; };
use lemmy_db_views::structs::{CustomEmojiView, LocalUserView, SiteView}; use lemmy_db_views::structs::{CustomEmojiView, LocalUserView, SiteView};
use lemmy_db_views_actor::structs::{ use lemmy_db_views_actor::structs::{
CommunityBlockView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, InstanceBlockView,
CommunityFollowerView, PersonBlockView, PersonView,
CommunityModeratorView,
InstanceBlockView,
PersonBlockView,
PersonView,
}; };
use lemmy_utils::{ use lemmy_utils::{
error::{LemmyError, LemmyErrorExt, LemmyErrorType}, error::{LemmyError, LemmyErrorExt, LemmyErrorType},

View File

@ -26,11 +26,8 @@ use lemmy_utils::{
utils::{ utils::{
slurs::check_slurs_opt, slurs::check_slurs_opt,
validation::{ validation::{
build_and_check_regex, build_and_check_regex, check_site_visibility_valid, is_valid_body_field,
check_site_visibility_valid, site_description_length_check, site_name_length_check,
is_valid_body_field,
site_description_length_check,
site_name_length_check,
}, },
}, },
}; };

View File

@ -4,17 +4,9 @@ use lemmy_api_common::{
context::LemmyContext, context::LemmyContext,
person::{LoginResponse, Register}, person::{LoginResponse, Register},
utils::{ utils::{
generate_inbox_url, generate_inbox_url, generate_local_apub_endpoint, generate_shared_inbox_url, honeypot_check,
generate_local_apub_endpoint, local_site_to_slur_regex, password_length_check, sanitize_html_api, sanitize_html_api_opt,
generate_shared_inbox_url, send_new_applicant_email_to_admins, send_verification_email, EndpointType,
honeypot_check,
local_site_to_slur_regex,
password_length_check,
sanitize_html_api,
sanitize_html_api_opt,
send_new_applicant_email_to_admins,
send_verification_email,
EndpointType,
}, },
}; };
use lemmy_db_schema::{ use lemmy_db_schema::{

View File

@ -2,10 +2,7 @@ use crate::{
activities::{ activities::{
block::{generate_cc, SiteOrCommunity}, block::{generate_cc, SiteOrCommunity},
community::send_activity_in_community, community::send_activity_in_community,
generate_activity_id, generate_activity_id, send_lemmy_activity, verify_is_public, verify_mod_action,
send_lemmy_activity,
verify_is_public,
verify_mod_action,
verify_person_in_community, verify_person_in_community,
}, },
activity_lists::AnnouncableActivities, activity_lists::AnnouncableActivities,
@ -29,10 +26,7 @@ use lemmy_db_schema::{
source::{ source::{
activity::ActivitySendTargets, activity::ActivitySendTargets,
community::{ community::{
CommunityFollower, CommunityFollower, CommunityFollowerForm, CommunityPersonBan, CommunityPersonBanForm,
CommunityFollowerForm,
CommunityPersonBan,
CommunityPersonBanForm,
}, },
moderator::{ModBan, ModBanForm, ModBanFromCommunity, ModBanFromCommunityForm}, moderator::{ModBan, ModBanForm, ModBanFromCommunity, ModBanFromCommunityForm},
person::{Person, PersonUpdateForm}, person::{Person, PersonUpdateForm},

View File

@ -2,9 +2,7 @@ use crate::{
activities::{ activities::{
block::{generate_cc, SiteOrCommunity}, block::{generate_cc, SiteOrCommunity},
community::send_activity_in_community, community::send_activity_in_community,
generate_activity_id, generate_activity_id, send_lemmy_activity, verify_is_public,
send_lemmy_activity,
verify_is_public,
}, },
activity_lists::AnnouncableActivities, activity_lists::AnnouncableActivities,
insert_received_activity, insert_received_activity,

View File

@ -1,9 +1,6 @@
use crate::{ use crate::{
activities::{ activities::{
generate_activity_id, generate_activity_id, generate_announce_activity_id, send_lemmy_activity, verify_is_public,
generate_announce_activity_id,
send_lemmy_activity,
verify_is_public,
verify_person_in_community, verify_person_in_community,
}, },
activity_lists::AnnouncableActivities, activity_lists::AnnouncableActivities,
@ -11,9 +8,7 @@ use crate::{
objects::community::ApubCommunity, objects::community::ApubCommunity,
protocol::{ protocol::{
activities::community::announce::{AnnounceActivity, RawAnnouncableActivities}, activities::community::announce::{AnnounceActivity, RawAnnouncableActivities},
Id, Id, IdOrNestedObject, InCommunity,
IdOrNestedObject,
InCommunity,
}, },
}; };
use activitypub_federation::{ use activitypub_federation::{

View File

@ -1,10 +1,7 @@
use crate::{ use crate::{
activities::{ activities::{
community::send_activity_in_community, community::send_activity_in_community, generate_activity_id, verify_is_public,
generate_activity_id, verify_mod_action, verify_person_in_community,
verify_is_public,
verify_mod_action,
verify_person_in_community,
}, },
activity_lists::AnnouncableActivities, activity_lists::AnnouncableActivities,
insert_received_activity, insert_received_activity,

View File

@ -1,10 +1,7 @@
use crate::{ use crate::{
activities::{ activities::{
community::send_activity_in_community, community::send_activity_in_community, generate_activity_id, verify_is_public,
generate_activity_id, verify_mod_action, verify_person_in_community,
verify_is_public,
verify_mod_action,
verify_person_in_community,
}, },
activity_lists::AnnouncableActivities, activity_lists::AnnouncableActivities,
insert_received_activity, insert_received_activity,

View File

@ -1,11 +1,7 @@
use crate::{ use crate::{
activities::{ activities::{
check_community_deleted_or_removed, check_community_deleted_or_removed, community::send_activity_in_community,
community::send_activity_in_community, generate_activity_id, verify_is_public, verify_mod_action, verify_person_in_community,
generate_activity_id,
verify_is_public,
verify_mod_action,
verify_person_in_community,
}, },
activity_lists::AnnouncableActivities, activity_lists::AnnouncableActivities,
insert_received_activity, insert_received_activity,

View File

@ -1,10 +1,7 @@
use crate::{ use crate::{
activities::{ activities::{
community::send_activity_in_community, community::send_activity_in_community, generate_activity_id, verify_is_public,
generate_activity_id, verify_mod_action, verify_person_in_community,
verify_is_public,
verify_mod_action,
verify_person_in_community,
}, },
activity_lists::AnnouncableActivities, activity_lists::AnnouncableActivities,
insert_received_activity, insert_received_activity,

View File

@ -1,10 +1,7 @@
use crate::{ use crate::{
activities::{ activities::{
check_community_deleted_or_removed, check_community_deleted_or_removed, community::send_activity_in_community,
community::send_activity_in_community, generate_activity_id, verify_is_public, verify_person_in_community,
generate_activity_id,
verify_is_public,
verify_person_in_community,
}, },
activity_lists::AnnouncableActivities, activity_lists::AnnouncableActivities,
insert_received_activity, insert_received_activity,

View File

@ -1,11 +1,7 @@
use crate::{ use crate::{
activities::{ activities::{
check_community_deleted_or_removed, check_community_deleted_or_removed, community::send_activity_in_community,
community::send_activity_in_community, generate_activity_id, verify_is_public, verify_mod_action, verify_person_in_community,
generate_activity_id,
verify_is_public,
verify_mod_action,
verify_person_in_community,
}, },
activity_lists::AnnouncableActivities, activity_lists::AnnouncableActivities,
insert_received_activity, insert_received_activity,

View File

@ -3,8 +3,7 @@ use crate::{
insert_received_activity, insert_received_activity,
objects::{person::ApubPerson, private_message::ApubPrivateMessage}, objects::{person::ApubPerson, private_message::ApubPrivateMessage},
protocol::activities::{ protocol::activities::{
create_or_update::chat_message::CreateOrUpdateChatMessage, create_or_update::chat_message::CreateOrUpdateChatMessage, CreateOrUpdateType,
CreateOrUpdateType,
}, },
}; };
use activitypub_federation::{ use activitypub_federation::{

View File

@ -14,12 +14,8 @@ use lemmy_db_schema::{
comment::{Comment, CommentUpdateForm}, comment::{Comment, CommentUpdateForm},
community::{Community, CommunityUpdateForm}, community::{Community, CommunityUpdateForm},
moderator::{ moderator::{
ModRemoveComment, ModRemoveComment, ModRemoveCommentForm, ModRemoveCommunity, ModRemoveCommunityForm,
ModRemoveCommentForm, ModRemovePost, ModRemovePostForm,
ModRemoveCommunity,
ModRemoveCommunityForm,
ModRemovePost,
ModRemovePostForm,
}, },
post::{Post, PostUpdateForm}, post::{Post, PostUpdateForm},
}, },

View File

@ -1,18 +1,11 @@
use crate::{ use crate::{
activities::{ activities::{
community::send_activity_in_community, community::send_activity_in_community, send_lemmy_activity, verify_is_public,
send_lemmy_activity, verify_mod_action, verify_person, verify_person_in_community,
verify_is_public,
verify_mod_action,
verify_person,
verify_person_in_community,
}, },
activity_lists::AnnouncableActivities, activity_lists::AnnouncableActivities,
objects::{ objects::{
comment::ApubComment, comment::ApubComment, community::ApubCommunity, person::ApubPerson, post::ApubPost,
community::ApubCommunity,
person::ApubPerson,
post::ApubPost,
private_message::ApubPrivateMessage, private_message::ApubPrivateMessage,
}, },
protocol::{ protocol::{

View File

@ -14,12 +14,8 @@ use lemmy_db_schema::{
comment::{Comment, CommentUpdateForm}, comment::{Comment, CommentUpdateForm},
community::{Community, CommunityUpdateForm}, community::{Community, CommunityUpdateForm},
moderator::{ moderator::{
ModRemoveComment, ModRemoveComment, ModRemoveCommentForm, ModRemoveCommunity, ModRemoveCommunityForm,
ModRemoveCommentForm, ModRemovePost, ModRemovePostForm,
ModRemoveCommunity,
ModRemoveCommunityForm,
ModRemovePost,
ModRemovePostForm,
}, },
post::{Post, PostUpdateForm}, post::{Post, PostUpdateForm},
}, },

View File

@ -1,9 +1,6 @@
use crate::{ use crate::{
activities::{ activities::{
generate_activity_id, generate_activity_id, send_lemmy_activity, verify_person, verify_person_in_community,
send_lemmy_activity,
verify_person,
verify_person_in_community,
}, },
fetcher::user_or_community::UserOrCommunity, fetcher::user_or_community::UserOrCommunity,
insert_received_activity, insert_received_activity,

View File

@ -9,11 +9,8 @@ use crate::{
}, },
create_or_update::private_message::send_create_or_update_pm, create_or_update::private_message::send_create_or_update_pm,
deletion::{ deletion::{
delete_user::delete_user, delete_user::delete_user, send_apub_delete_in_community, send_apub_delete_in_community_new,
send_apub_delete_in_community, send_apub_delete_private_message, DeletableObjects,
send_apub_delete_in_community_new,
send_apub_delete_private_message,
DeletableObjects,
}, },
voting::send_like_activity, voting::send_like_activity,
}, },

View File

@ -1,7 +1,6 @@
use crate::{ use crate::{
activities::{ activities::{
generate_activity_id, generate_activity_id, verify_person_in_community,
verify_person_in_community,
voting::{undo_vote_comment, undo_vote_post}, voting::{undo_vote_comment, undo_vote_post},
}, },
insert_received_activity, insert_received_activity,

View File

@ -1,7 +1,6 @@
use crate::{ use crate::{
activities::{ activities::{
generate_activity_id, generate_activity_id, verify_person_in_community,
verify_person_in_community,
voting::{vote_comment, vote_post}, voting::{vote_comment, vote_post},
}, },
insert_received_activity, insert_received_activity,

View File

@ -12,9 +12,7 @@ use crate::{
update::UpdateCommunity, update::UpdateCommunity,
}, },
create_or_update::{ create_or_update::{
chat_message::CreateOrUpdateChatMessage, chat_message::CreateOrUpdateChatMessage, note::CreateOrUpdateNote, page::CreateOrUpdatePage,
note::CreateOrUpdateNote,
page::CreateOrUpdatePage,
}, },
deletion::{delete::Delete, delete_user::DeleteUser, undo_delete::UndoDelete}, deletion::{delete::Delete, delete_user::DeleteUser, undo_delete::UndoDelete},
following::{accept::AcceptFollow, follow::Follow, undo_follow::UndoFollow}, following::{accept::AcceptFollow, follow::Follow, undo_follow::UndoFollow},

View File

@ -1,6 +1,5 @@
use crate::{ use crate::{
api::listing_type_with_default, api::listing_type_with_default, fetcher::resolve_actor_identifier,
fetcher::resolve_actor_identifier,
objects::community::ApubCommunity, objects::community::ApubCommunity,
}; };
use activitypub_federation::config::Data; use activitypub_federation::config::Data;

View File

@ -1,6 +1,5 @@
use crate::{ use crate::{
api::listing_type_with_default, api::listing_type_with_default, fetcher::resolve_actor_identifier,
fetcher::resolve_actor_identifier,
objects::community::ApubCommunity, objects::community::ApubCommunity,
}; };
use activitypub_federation::config::Data; use activitypub_federation::config::Data;

View File

@ -7,10 +7,7 @@ use lemmy_api_common::{
utils::{check_private_instance, is_mod_or_admin_opt}, utils::{check_private_instance, is_mod_or_admin_opt},
}; };
use lemmy_db_schema::source::{ use lemmy_db_schema::source::{
actor_language::CommunityLanguage, actor_language::CommunityLanguage, community::Community, local_site::LocalSite, site::Site,
community::Community,
local_site::LocalSite,
site::Site,
}; };
use lemmy_db_views::structs::LocalUserView; use lemmy_db_views::structs::LocalUserView;
use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView}; use lemmy_db_views_actor::structs::{CommunityModeratorView, CommunityView};

View File

@ -1,7 +1,5 @@
use crate::fetcher::search::{ use crate::fetcher::search::{
search_query_to_object_id, search_query_to_object_id, search_query_to_object_id_local, SearchableObjects,
search_query_to_object_id_local,
SearchableObjects,
}; };
use activitypub_federation::config::Data; use activitypub_federation::config::Data;
use actix_web::web::{Json, Query}; use actix_web::web::{Json, Query};

View File

@ -3,11 +3,8 @@ use crate::{
protocol::collections::group_moderators::GroupModerators, protocol::collections::group_moderators::GroupModerators,
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, kinds::collection::OrderedCollectionType,
fetch::object_id::ObjectId, protocol::verification::verify_domains_match, traits::Collection,
kinds::collection::OrderedCollectionType,
protocol::verification::verify_domains_match,
traits::Collection,
}; };
use lemmy_api_common::{context::LemmyContext, utils::generate_moderators_url}; use lemmy_api_common::{context::LemmyContext, utils::generate_moderators_url};
use lemmy_db_schema::{ use lemmy_db_schema::{
@ -108,8 +105,7 @@ mod tests {
use super::*; use super::*;
use crate::{ use crate::{
objects::{ objects::{
community::tests::parse_lemmy_community, community::tests::parse_lemmy_community, person::tests::parse_lemmy_person,
person::tests::parse_lemmy_person,
tests::init_context, tests::init_context,
}, },
protocol::tests::file_to_json_object, protocol::tests::file_to_json_object,

View File

@ -3,8 +3,7 @@ use crate::{
objects::{community::ApubCommunity, post::ApubPost}, objects::{community::ApubCommunity, post::ApubPost},
protocol::{ protocol::{
activities::{ activities::{
community::announce::AnnounceActivity, community::announce::AnnounceActivity, create_or_update::page::CreateOrUpdatePage,
create_or_update::page::CreateOrUpdatePage,
CreateOrUpdateType, CreateOrUpdateType,
}, },
collections::group_outbox::GroupOutbox, collections::group_outbox::GroupOutbox,

View File

@ -1,8 +1,7 @@
use crate::{ use crate::{
activity_lists::GroupInboxActivities, activity_lists::GroupInboxActivities,
collections::{ collections::{
community_featured::ApubCommunityFeatured, community_featured::ApubCommunityFeatured, community_moderators::ApubCommunityModerators,
community_moderators::ApubCommunityModerators,
community_outbox::ApubCommunityOutbox, community_outbox::ApubCommunityOutbox,
}, },
http::{create_apub_response, create_apub_tombstone_response}, http::{create_apub_response, create_apub_tombstone_response},

View File

@ -1,13 +1,9 @@
use crate::{ use crate::{
activity_lists::SharedInboxActivities, activity_lists::SharedInboxActivities, fetcher::user_or_community::UserOrCommunity,
fetcher::user_or_community::UserOrCommunity, protocol::objects::tombstone::Tombstone, CONTEXT,
protocol::objects::tombstone::Tombstone,
CONTEXT,
}; };
use activitypub_federation::{ use activitypub_federation::{
actix_web::inbox::receive_activity, actix_web::inbox::receive_activity, config::Data, protocol::context::WithContext,
config::Data,
protocol::context::WithContext,
FEDERATION_CONTENT_TYPE, FEDERATION_CONTENT_TYPE,
}; };
use actix_web::{web, web::Bytes, HttpRequest, HttpResponse}; use actix_web::{web, web::Bytes, HttpRequest, HttpResponse};

View File

@ -6,10 +6,7 @@ use crate::{
protocol::collections::empty_outbox::EmptyOutbox, protocol::collections::empty_outbox::EmptyOutbox,
}; };
use activitypub_federation::{ use activitypub_federation::{
actix_web::inbox::receive_activity, actix_web::inbox::receive_activity, config::Data, protocol::context::WithContext, traits::Object,
config::Data,
protocol::context::WithContext,
traits::Object,
}; };
use actix_web::{web, web::Bytes, HttpRequest, HttpResponse}; use actix_web::{web, web::Bytes, HttpRequest, HttpResponse};
use lemmy_api_common::{context::LemmyContext, utils::generate_outbox_url}; use lemmy_api_common::{context::LemmyContext, utils::generate_outbox_url};

View File

@ -1,12 +1,8 @@
use crate::http::{ use crate::http::{
comment::get_apub_comment, comment::get_apub_comment,
community::{ community::{
community_inbox, community_inbox, get_apub_community_featured, get_apub_community_followers,
get_apub_community_featured, get_apub_community_http, get_apub_community_moderators, get_apub_community_outbox,
get_apub_community_followers,
get_apub_community_http,
get_apub_community_moderators,
get_apub_community_outbox,
}, },
get_activity, get_activity,
person::{get_apub_person_http, get_apub_person_outbox, person_inbox}, person::{get_apub_person_http, get_apub_person_outbox, person_inbox},

View File

@ -5,10 +5,7 @@ use crate::{
protocol::collections::empty_outbox::EmptyOutbox, protocol::collections::empty_outbox::EmptyOutbox,
}; };
use activitypub_federation::{ use activitypub_federation::{
actix_web::inbox::receive_activity, actix_web::inbox::receive_activity, config::Data, protocol::context::WithContext, traits::Object,
config::Data,
protocol::context::WithContext,
traits::Object,
}; };
use actix_web::{web::Bytes, HttpRequest, HttpResponse}; use actix_web::{web::Bytes, HttpRequest, HttpResponse};
use lemmy_api_common::context::LemmyContext; use lemmy_api_common::context::LemmyContext;

View File

@ -5,8 +5,7 @@ use crate::{
objects::{read_from_string_or_source, verify_is_remote_object}, objects::{read_from_string_or_source, verify_is_remote_object},
protocol::{ protocol::{
objects::{note::Note, LanguageTag}, objects::{note::Note, LanguageTag},
InCommunity, InCommunity, Source,
Source,
}, },
}; };
use activitypub_federation::{ use activitypub_federation::{

View File

@ -1,12 +1,10 @@
use crate::{ use crate::{
activities::GetActorType, activities::GetActorType,
check_apub_id_valid, check_apub_id_valid, local_site_data_cached,
local_site_data_cached,
objects::instance::fetch_instance_actor_for_object, objects::instance::fetch_instance_actor_for_object,
protocol::{ protocol::{
objects::{group::Group, Endpoints, LanguageTag}, objects::{group::Group, Endpoints, LanguageTag},
ImageObject, ImageObject, Source,
Source,
}, },
}; };
use activitypub_federation::{ use activitypub_federation::{

View File

@ -1,12 +1,10 @@
use crate::{ use crate::{
activities::GetActorType, activities::GetActorType,
check_apub_id_valid_with_strictness, check_apub_id_valid_with_strictness, local_site_data_cached,
local_site_data_cached,
objects::read_from_string_or_source_opt, objects::read_from_string_or_source_opt,
protocol::{ protocol::{
objects::{instance::Instance, LanguageTag}, objects::{instance::Instance, LanguageTag},
ImageObject, ImageObject, Source,
Source,
}, },
}; };
use activitypub_federation::{ use activitypub_federation::{

View File

@ -1,15 +1,13 @@
use crate::{ use crate::{
activities::GetActorType, activities::GetActorType,
check_apub_id_valid_with_strictness, check_apub_id_valid_with_strictness, local_site_data_cached,
local_site_data_cached,
objects::{instance::fetch_instance_actor_for_object, read_from_string_or_source_opt}, objects::{instance::fetch_instance_actor_for_object, read_from_string_or_source_opt},
protocol::{ protocol::{
objects::{ objects::{
person::{Person, UserTypes}, person::{Person, UserTypes},
Endpoints, Endpoints,
}, },
ImageObject, ImageObject, Source,
Source,
}, },
}; };
use activitypub_federation::{ use activitypub_federation::{
@ -21,9 +19,7 @@ use chrono::{DateTime, Utc};
use lemmy_api_common::{ use lemmy_api_common::{
context::LemmyContext, context::LemmyContext,
utils::{ utils::{
generate_outbox_url, generate_outbox_url, local_site_opt_to_slur_regex, sanitize_html_federation,
local_site_opt_to_slur_regex,
sanitize_html_federation,
sanitize_html_federation_opt, sanitize_html_federation_opt,
}, },
}; };

View File

@ -1,16 +1,13 @@
use crate::{ use crate::{
activities::{verify_is_public, verify_person_in_community}, activities::{verify_is_public, verify_person_in_community},
check_apub_id_valid_with_strictness, check_apub_id_valid_with_strictness, local_site_data_cached,
local_site_data_cached,
objects::{read_from_string_or_source_opt, verify_is_remote_object}, objects::{read_from_string_or_source_opt, verify_is_remote_object},
protocol::{ protocol::{
objects::{ objects::{
page::{Attachment, AttributedTo, Page, PageType}, page::{Attachment, AttributedTo, Page, PageType},
LanguageTag, LanguageTag,
}, },
ImageObject, ImageObject, InCommunity, Source,
InCommunity,
Source,
}, },
}; };
use activitypub_federation::{ use activitypub_federation::{
@ -26,11 +23,8 @@ use lemmy_api_common::{
context::LemmyContext, context::LemmyContext,
request::fetch_site_data, request::fetch_site_data,
utils::{ utils::{
is_mod_or_admin, is_mod_or_admin, local_site_opt_to_sensitive, local_site_opt_to_slur_regex,
local_site_opt_to_sensitive, sanitize_html_federation, sanitize_html_federation_opt,
local_site_opt_to_slur_regex,
sanitize_html_federation,
sanitize_html_federation_opt,
}, },
}; };
use lemmy_db_schema::{ use lemmy_db_schema::{
@ -300,9 +294,7 @@ mod tests {
use super::*; use super::*;
use crate::{ use crate::{
objects::{ objects::{
community::tests::parse_lemmy_community, community::tests::parse_lemmy_community, person::tests::parse_lemmy_person, post::ApubPost,
person::tests::parse_lemmy_person,
post::ApubPost,
tests::init_context, tests::init_context,
}, },
protocol::tests::file_to_json_object, protocol::tests::file_to_json_object,

View File

@ -4,9 +4,7 @@ use crate::{
protocol::InCommunity, protocol::InCommunity,
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, kinds::activity::BlockType,
fetch::object_id::ObjectId,
kinds::activity::BlockType,
protocol::helpers::deserialize_one_or_many, protocol::helpers::deserialize_one_or_many,
}; };
use anyhow::anyhow; use anyhow::anyhow;

View File

@ -4,9 +4,7 @@ use crate::{
protocol::{activities::block::block_user::BlockUser, InCommunity}, protocol::{activities::block::block_user::BlockUser, InCommunity},
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, kinds::activity::UndoType,
fetch::object_id::ObjectId,
kinds::activity::UndoType,
protocol::helpers::deserialize_one_or_many, protocol::helpers::deserialize_one_or_many,
}; };
use lemmy_api_common::context::LemmyContext; use lemmy_api_common::context::LemmyContext;

View File

@ -1,7 +1,6 @@
use crate::{objects::community::ApubCommunity, protocol::IdOrNestedObject}; use crate::{objects::community::ApubCommunity, protocol::IdOrNestedObject};
use activitypub_federation::{ use activitypub_federation::{
fetch::object_id::ObjectId, fetch::object_id::ObjectId, kinds::activity::AnnounceType,
kinds::activity::AnnounceType,
protocol::helpers::deserialize_one_or_many, protocol::helpers::deserialize_one_or_many,
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@ -4,9 +4,7 @@ use crate::{
protocol::InCommunity, protocol::InCommunity,
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, kinds::activity::AddType,
fetch::object_id::ObjectId,
kinds::activity::AddType,
protocol::helpers::deserialize_one_or_many, protocol::helpers::deserialize_one_or_many,
}; };
use lemmy_api_common::context::LemmyContext; use lemmy_api_common::context::LemmyContext;

View File

@ -4,9 +4,7 @@ use crate::{
protocol::InCommunity, protocol::InCommunity,
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, kinds::activity::RemoveType,
fetch::object_id::ObjectId,
kinds::activity::RemoveType,
protocol::helpers::deserialize_one_or_many, protocol::helpers::deserialize_one_or_many,
}; };
use lemmy_api_common::context::LemmyContext; use lemmy_api_common::context::LemmyContext;

View File

@ -4,9 +4,7 @@ use crate::{
protocol::InCommunity, protocol::InCommunity,
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, kinds::activity::UndoType,
fetch::object_id::ObjectId,
kinds::activity::UndoType,
protocol::helpers::deserialize_one_or_many, protocol::helpers::deserialize_one_or_many,
}; };
use lemmy_api_common::context::LemmyContext; use lemmy_api_common::context::LemmyContext;

View File

@ -5,9 +5,7 @@ use crate::{
protocol::InCommunity, protocol::InCommunity,
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, kinds::activity::FlagType,
fetch::object_id::ObjectId,
kinds::activity::FlagType,
protocol::helpers::deserialize_one, protocol::helpers::deserialize_one,
}; };
use lemmy_api_common::context::LemmyContext; use lemmy_api_common::context::LemmyContext;

View File

@ -4,9 +4,7 @@ use crate::{
protocol::{objects::group::Group, InCommunity}, protocol::{objects::group::Group, InCommunity},
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, kinds::activity::UpdateType,
fetch::object_id::ObjectId,
kinds::activity::UpdateType,
protocol::helpers::deserialize_one_or_many, protocol::helpers::deserialize_one_or_many,
}; };
use lemmy_api_common::context::LemmyContext; use lemmy_api_common::context::LemmyContext;

View File

@ -9,9 +9,7 @@ mod tests {
use crate::protocol::{ use crate::protocol::{
activities::create_or_update::{ activities::create_or_update::{
chat_message::CreateOrUpdateChatMessage, chat_message::CreateOrUpdateChatMessage, note::CreateOrUpdateNote, page::CreateOrUpdatePage,
note::CreateOrUpdateNote,
page::CreateOrUpdatePage,
}, },
tests::test_parse_lemmy_item, tests::test_parse_lemmy_item,
}; };

View File

@ -5,9 +5,7 @@ use crate::{
protocol::{activities::CreateOrUpdateType, objects::note::Note, InCommunity}, protocol::{activities::CreateOrUpdateType, objects::note::Note, InCommunity},
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, protocol::helpers::deserialize_one_or_many,
fetch::object_id::ObjectId,
protocol::helpers::deserialize_one_or_many,
}; };
use lemmy_api_common::context::LemmyContext; use lemmy_api_common::context::LemmyContext;
use lemmy_db_schema::{source::community::Community, traits::Crud}; use lemmy_db_schema::{source::community::Community, traits::Crud};

View File

@ -4,9 +4,7 @@ use crate::{
protocol::{activities::CreateOrUpdateType, objects::page::Page, InCommunity}, protocol::{activities::CreateOrUpdateType, objects::page::Page, InCommunity},
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, protocol::helpers::deserialize_one_or_many,
fetch::object_id::ObjectId,
protocol::helpers::deserialize_one_or_many,
}; };
use lemmy_api_common::context::LemmyContext; use lemmy_api_common::context::LemmyContext;
use lemmy_utils::error::LemmyError; use lemmy_utils::error::LemmyError;

View File

@ -4,9 +4,7 @@ use crate::{
protocol::{objects::tombstone::Tombstone, IdOrNestedObject, InCommunity}, protocol::{objects::tombstone::Tombstone, IdOrNestedObject, InCommunity},
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, kinds::activity::DeleteType,
fetch::object_id::ObjectId,
kinds::activity::DeleteType,
protocol::helpers::deserialize_one_or_many, protocol::helpers::deserialize_one_or_many,
}; };
use anyhow::anyhow; use anyhow::anyhow;

View File

@ -1,7 +1,6 @@
use crate::objects::person::ApubPerson; use crate::objects::person::ApubPerson;
use activitypub_federation::{ use activitypub_federation::{
fetch::object_id::ObjectId, fetch::object_id::ObjectId, kinds::activity::DeleteType,
kinds::activity::DeleteType,
protocol::helpers::deserialize_one_or_many, protocol::helpers::deserialize_one_or_many,
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@ -4,9 +4,7 @@ use crate::{
protocol::{activities::deletion::delete::Delete, InCommunity}, protocol::{activities::deletion::delete::Delete, InCommunity},
}; };
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::object_id::ObjectId, kinds::activity::UndoType,
fetch::object_id::ObjectId,
kinds::activity::UndoType,
protocol::helpers::deserialize_one_or_many, protocol::helpers::deserialize_one_or_many,
}; };
use lemmy_api_common::context::LemmyContext; use lemmy_api_common::context::LemmyContext;

View File

@ -3,8 +3,7 @@ use crate::{
protocol::activities::following::follow::Follow, protocol::activities::following::follow::Follow,
}; };
use activitypub_federation::{ use activitypub_federation::{
fetch::object_id::ObjectId, fetch::object_id::ObjectId, kinds::activity::AcceptType,
kinds::activity::AcceptType,
protocol::helpers::deserialize_skip_error, protocol::helpers::deserialize_skip_error,
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@ -1,7 +1,6 @@
use crate::{fetcher::user_or_community::UserOrCommunity, objects::person::ApubPerson}; use crate::{fetcher::user_or_community::UserOrCommunity, objects::person::ApubPerson};
use activitypub_federation::{ use activitypub_federation::{
fetch::object_id::ObjectId, fetch::object_id::ObjectId, kinds::activity::FollowType,
kinds::activity::FollowType,
protocol::helpers::deserialize_skip_error, protocol::helpers::deserialize_skip_error,
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@ -1,8 +1,6 @@
use crate::{objects::person::ApubPerson, protocol::activities::following::follow::Follow}; use crate::{objects::person::ApubPerson, protocol::activities::following::follow::Follow};
use activitypub_federation::{ use activitypub_federation::{
fetch::object_id::ObjectId, fetch::object_id::ObjectId, kinds::activity::UndoType, protocol::helpers::deserialize_skip_error,
kinds::activity::UndoType,
protocol::helpers::deserialize_skip_error,
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use url::Url; use url::Url;

View File

@ -1,7 +1,6 @@
use crate::objects::person::ApubPerson; use crate::objects::person::ApubPerson;
use activitypub_federation::{ use activitypub_federation::{
fetch::object_id::ObjectId, fetch::object_id::ObjectId, kinds::collection::OrderedCollectionType,
kinds::collection::OrderedCollectionType,
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use url::Url; use url::Url;

View File

@ -11,11 +11,8 @@ mod tests {
use crate::protocol::{ use crate::protocol::{
collections::{ collections::{
empty_outbox::EmptyOutbox, empty_outbox::EmptyOutbox, group_featured::GroupFeatured, group_followers::GroupFollowers,
group_featured::GroupFeatured, group_moderators::GroupModerators, group_outbox::GroupOutbox,
group_followers::GroupFollowers,
group_moderators::GroupModerators,
group_outbox::GroupOutbox,
}, },
tests::{test_json, test_parse_lemmy_item}, tests::{test_json, test_parse_lemmy_item},
}; };

View File

@ -1,8 +1,6 @@
use crate::objects::community::ApubCommunity; use crate::objects::community::ApubCommunity;
use activitypub_federation::{ use activitypub_federation::{
config::Data, config::Data, fetch::fetch_object_http, kinds::object::ImageType,
fetch::fetch_object_http,
kinds::object::ImageType,
protocol::values::MediaTypeMarkdown, protocol::values::MediaTypeMarkdown,
}; };
use lemmy_api_common::context::LemmyContext; use lemmy_api_common::context::LemmyContext;

View File

@ -1,25 +1,21 @@
use crate::{ use crate::{
check_apub_id_valid_with_strictness, check_apub_id_valid_with_strictness,
collections::{ collections::{
community_featured::ApubCommunityFeatured, community_featured::ApubCommunityFeatured, community_moderators::ApubCommunityModerators,
community_moderators::ApubCommunityModerators,
community_outbox::ApubCommunityOutbox, community_outbox::ApubCommunityOutbox,
}, },
local_site_data_cached, local_site_data_cached,
objects::{community::ApubCommunity, read_from_string_or_source_opt}, objects::{community::ApubCommunity, read_from_string_or_source_opt},
protocol::{ protocol::{
objects::{Endpoints, LanguageTag}, objects::{Endpoints, LanguageTag},
ImageObject, ImageObject, Source,
Source,
}, },
}; };
use activitypub_federation::{ use activitypub_federation::{
fetch::{collection_id::CollectionId, object_id::ObjectId}, fetch::{collection_id::CollectionId, object_id::ObjectId},
kinds::actor::GroupType, kinds::actor::GroupType,
protocol::{ protocol::{
helpers::deserialize_skip_error, helpers::deserialize_skip_error, public_key::PublicKey, verification::verify_domains_match,
public_key::PublicKey,
verification::verify_domains_match,
}, },
}; };
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};

View File

@ -1,7 +1,5 @@
use lemmy_db_schema::{ use lemmy_db_schema::{
impls::actor_language::UNDETERMINED_ID, impls::actor_language::UNDETERMINED_ID, newtypes::LanguageId, source::language::Language,
newtypes::LanguageId,
source::language::Language,
utils::DbPool, utils::DbPool,
}; };
use lemmy_utils::error::LemmyError; use lemmy_utils::error::LemmyError;
@ -100,13 +98,8 @@ mod tests {
use crate::protocol::{ use crate::protocol::{
objects::{ objects::{
chat_message::ChatMessage, chat_message::ChatMessage, group::Group, instance::Instance, note::Note, page::Page,
group::Group, person::Person, tombstone::Tombstone,
instance::Instance,
note::Note,
page::Page,
person::Person,
tombstone::Tombstone,
}, },
tests::{test_json, test_parse_lemmy_item}, tests::{test_json, test_parse_lemmy_item},
}; };

View File

@ -4,8 +4,7 @@ use crate::{
schema::{community_aggregates, post, post_aggregates}, schema::{community_aggregates, post, post_aggregates},
utils::{ utils::{
functions::{hot_rank, scaled_rank}, functions::{hot_rank, scaled_rank},
get_conn, get_conn, DbPool,
DbPool,
}, },
}; };
use diesel::{result::Error, ExpressionMethods, JoinOnDsl, QueryDsl}; use diesel::{result::Error, ExpressionMethods, JoinOnDsl, QueryDsl};

View File

@ -1,12 +1,8 @@
use crate::newtypes::{CommentId, CommunityId, InstanceId, PersonId, PostId, SiteId}; use crate::newtypes::{CommentId, CommunityId, InstanceId, PersonId, PostId, SiteId};
#[cfg(feature = "full")] #[cfg(feature = "full")]
use crate::schema::{ use crate::schema::{
comment_aggregates, comment_aggregates, community_aggregates, person_aggregates, person_post_aggregates,
community_aggregates, post_aggregates, site_aggregates,
person_aggregates,
person_post_aggregates,
post_aggregates,
site_aggregates,
}; };
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@ -7,8 +7,7 @@ use crate::{
use diesel::{ use diesel::{
dsl::insert_into, dsl::insert_into,
result::{DatabaseErrorKind, Error, Error::DatabaseError}, result::{DatabaseErrorKind, Error, Error::DatabaseError},
ExpressionMethods, ExpressionMethods, QueryDsl,
QueryDsl,
}; };
use diesel_async::RunQueryDsl; use diesel_async::RunQueryDsl;

View File

@ -4,12 +4,8 @@ use crate::{
schema::{local_site, site, site_language}, schema::{local_site, site, site_language},
source::{ source::{
actor_language::{ actor_language::{
CommunityLanguage, CommunityLanguage, CommunityLanguageForm, LocalUserLanguage, LocalUserLanguageForm,
CommunityLanguageForm, SiteLanguage, SiteLanguageForm,
LocalUserLanguage,
LocalUserLanguageForm,
SiteLanguage,
SiteLanguageForm,
}, },
language::Language, language::Language,
site::Site, site::Site,
@ -21,9 +17,7 @@ use diesel::{
dsl::{count, exists}, dsl::{count, exists},
insert_into, insert_into,
result::Error, result::Error,
select, select, ExpressionMethods, QueryDsl,
ExpressionMethods,
QueryDsl,
}; };
use diesel_async::{AsyncPgConnection, RunQueryDsl}; use diesel_async::{AsyncPgConnection, RunQueryDsl};
use lemmy_utils::error::{LemmyError, LemmyErrorType}; use lemmy_utils::error::{LemmyError, LemmyErrorType};
@ -37,9 +31,7 @@ impl LocalUserLanguage {
for_local_user_id: LocalUserId, for_local_user_id: LocalUserId,
) -> Result<Vec<LanguageId>, Error> { ) -> Result<Vec<LanguageId>, Error> {
use crate::schema::local_user_language::dsl::{ use crate::schema::local_user_language::dsl::{
language_id, language_id, local_user_id, local_user_language,
local_user_id,
local_user_language,
}; };
let conn = &mut get_conn(pool).await?; let conn = &mut get_conn(pool).await?;
@ -222,9 +214,7 @@ impl CommunityLanguage {
for_instance_id: InstanceId, for_instance_id: InstanceId,
) -> Result<(), Error> { ) -> Result<(), Error> {
use crate::schema::{ use crate::schema::{
community::dsl as c, community::dsl as c, community_language::dsl as cl, site_language::dsl as sl,
community_language::dsl as cl,
site_language::dsl as sl,
}; };
let community_languages: Vec<LanguageId> = cl::community_language let community_languages: Vec<LanguageId> = cl::community_language
.left_outer_join(sl::site_language.on(cl::language_id.eq(sl::language_id))) .left_outer_join(sl::site_language.on(cl::language_id.eq(sl::language_id)))
@ -390,17 +380,8 @@ mod tests {
use super::*; use super::*;
use crate::{ use crate::{
impls::actor_language::{ impls::actor_language::{
convert_read_languages, convert_read_languages, convert_update_languages, default_post_language, get_conn,
convert_update_languages, CommunityLanguage, DbPool, Language, LanguageId, LocalUserLanguage, QueryDsl, RunQueryDsl,
default_post_language,
get_conn,
CommunityLanguage,
DbPool,
Language,
LanguageId,
LocalUserLanguage,
QueryDsl,
RunQueryDsl,
SiteLanguage, SiteLanguage,
}, },
source::{ source::{

View File

@ -4,13 +4,7 @@ use crate::{
utils::{functions::lower, get_conn, DbPool}, utils::{functions::lower, get_conn, DbPool},
}; };
use diesel::{ use diesel::{
delete, delete, dsl::exists, insert_into, result::Error, select, ExpressionMethods, QueryDsl,
dsl::exists,
insert_into,
result::Error,
select,
ExpressionMethods,
QueryDsl,
}; };
use diesel_async::RunQueryDsl; use diesel_async::RunQueryDsl;

View File

@ -2,12 +2,7 @@ use crate::{
newtypes::{CommentId, DbUrl, PersonId}, newtypes::{CommentId, DbUrl, PersonId},
schema::comment::dsl::{ap_id, comment, content, creator_id, deleted, path, removed, updated}, schema::comment::dsl::{ap_id, comment, content, creator_id, deleted, path, removed, updated},
source::comment::{ source::comment::{
Comment, Comment, CommentInsertForm, CommentLike, CommentLikeForm, CommentSaved, CommentSavedForm,
CommentInsertForm,
CommentLike,
CommentLikeForm,
CommentSaved,
CommentSavedForm,
CommentUpdateForm, CommentUpdateForm,
}, },
traits::{Crud, Likeable, Saveable}, traits::{Crud, Likeable, Saveable},
@ -16,8 +11,7 @@ use crate::{
use diesel::{ use diesel::{
dsl::{insert_into, sql_query}, dsl::{insert_into, sql_query},
result::Error, result::Error,
ExpressionMethods, ExpressionMethods, QueryDsl,
QueryDsl,
}; };
use diesel_async::RunQueryDsl; use diesel_async::RunQueryDsl;
use diesel_ltree::Ltree; use diesel_ltree::Ltree;
@ -249,12 +243,7 @@ mod tests {
newtypes::LanguageId, newtypes::LanguageId,
source::{ source::{
comment::{ comment::{
Comment, Comment, CommentInsertForm, CommentLike, CommentLikeForm, CommentSaved, CommentSavedForm,
CommentInsertForm,
CommentLike,
CommentLikeForm,
CommentSaved,
CommentSavedForm,
CommentUpdateForm, CommentUpdateForm,
}, },
community::{Community, CommunityInsertForm}, community::{Community, CommunityInsertForm},

View File

@ -8,8 +8,7 @@ use crate::{
use diesel::{ use diesel::{
dsl::{insert_into, update}, dsl::{insert_into, update},
result::Error, result::Error,
ExpressionMethods, ExpressionMethods, QueryDsl,
QueryDsl,
}; };
use diesel_async::RunQueryDsl; use diesel_async::RunQueryDsl;

View File

@ -4,15 +4,8 @@ use crate::{
source::{ source::{
actor_language::CommunityLanguage, actor_language::CommunityLanguage,
community::{ community::{
Community, Community, CommunityFollower, CommunityFollowerForm, CommunityInsertForm, CommunityModerator,
CommunityFollower, CommunityModeratorForm, CommunityPersonBan, CommunityPersonBanForm, CommunityUpdateForm,
CommunityFollowerForm,
CommunityInsertForm,
CommunityModerator,
CommunityModeratorForm,
CommunityPersonBan,
CommunityPersonBanForm,
CommunityUpdateForm,
}, },
}, },
traits::{ApubActor, Bannable, Crud, Followable, Joinable}, traits::{ApubActor, Bannable, Crud, Followable, Joinable},
@ -20,16 +13,8 @@ use crate::{
SubscribedType, SubscribedType,
}; };
use diesel::{ use diesel::{
deserialize, deserialize, dsl, dsl::insert_into, pg::Pg, result::Error, sql_types, ExpressionMethods,
dsl, NullableExpressionMethods, QueryDsl, Queryable,
dsl::insert_into,
pg::Pg,
result::Error,
sql_types,
ExpressionMethods,
NullableExpressionMethods,
QueryDsl,
Queryable,
}; };
use diesel_async::RunQueryDsl; use diesel_async::RunQueryDsl;
@ -262,10 +247,7 @@ impl Followable for CommunityFollower {
person_id_: PersonId, person_id_: PersonId,
) -> Result<Self, Error> { ) -> Result<Self, Error> {
use crate::schema::community_follower::dsl::{ use crate::schema::community_follower::dsl::{
community_follower, community_follower, community_id, pending, person_id,
community_id,
pending,
person_id,
}; };
let conn = &mut get_conn(pool).await?; let conn = &mut get_conn(pool).await?;
diesel::update( diesel::update(
@ -349,14 +331,8 @@ mod tests {
use crate::{ use crate::{
source::{ source::{
community::{ community::{
Community, Community, CommunityFollower, CommunityFollowerForm, CommunityInsertForm,
CommunityFollower, CommunityModerator, CommunityModeratorForm, CommunityPersonBan, CommunityPersonBanForm,
CommunityFollowerForm,
CommunityInsertForm,
CommunityModerator,
CommunityModeratorForm,
CommunityPersonBan,
CommunityPersonBanForm,
CommunityUpdateForm, CommunityUpdateForm,
}, },
instance::Instance, instance::Instance,

View File

@ -1,10 +1,7 @@
use crate::{ use crate::{
newtypes::LocalUserId, newtypes::LocalUserId,
schema::email_verification::dsl::{ schema::email_verification::dsl::{
email_verification, email_verification, local_user_id, published, verification_token,
local_user_id,
published,
verification_token,
}, },
source::email_verification::{EmailVerification, EmailVerificationForm}, source::email_verification::{EmailVerification, EmailVerificationForm},
utils::{get_conn, DbPool}, utils::{get_conn, DbPool},
@ -14,9 +11,7 @@ use diesel::{
insert_into, insert_into,
result::Error, result::Error,
sql_types::Timestamptz, sql_types::Timestamptz,
ExpressionMethods, ExpressionMethods, IntoSql, QueryDsl,
IntoSql,
QueryDsl,
}; };
use diesel_async::RunQueryDsl; use diesel_async::RunQueryDsl;

View File

@ -9,10 +9,7 @@ use diesel::{
dsl::{count_star, insert_into}, dsl::{count_star, insert_into},
result::Error, result::Error,
sql_types::{Nullable, Timestamptz}, sql_types::{Nullable, Timestamptz},
ExpressionMethods, ExpressionMethods, NullableExpressionMethods, QueryDsl, SelectableHelper,
NullableExpressionMethods,
QueryDsl,
SelectableHelper,
}; };
use diesel_async::RunQueryDsl; use diesel_async::RunQueryDsl;

View File

@ -1,9 +1,7 @@
use crate::{ use crate::{
schema::local_site_rate_limit, schema::local_site_rate_limit,
source::local_site_rate_limit::{ source::local_site_rate_limit::{
LocalSiteRateLimit, LocalSiteRateLimit, LocalSiteRateLimitInsertForm, LocalSiteRateLimitUpdateForm,
LocalSiteRateLimitInsertForm,
LocalSiteRateLimitUpdateForm,
}, },
utils::{get_conn, DbPool}, utils::{get_conn, DbPool},
}; };

View File

@ -1,12 +1,7 @@
use crate::{ use crate::{
newtypes::LocalUserId, newtypes::LocalUserId,
schema::local_user::dsl::{ schema::local_user::dsl::{
accepted_application, accepted_application, email, email_verified, local_user, password_encrypted, validator_time,
email,
email_verified,
local_user,
password_encrypted,
validator_time,
}, },
source::{ source::{
actor_language::{LocalUserLanguage, SiteLanguage}, actor_language::{LocalUserLanguage, SiteLanguage},

View File

@ -1,35 +1,12 @@
use crate::{ use crate::{
source::moderator::{ source::moderator::{
AdminPurgeComment, AdminPurgeComment, AdminPurgeCommentForm, AdminPurgeCommunity, AdminPurgeCommunityForm,
AdminPurgeCommentForm, AdminPurgePerson, AdminPurgePersonForm, AdminPurgePost, AdminPurgePostForm, ModAdd,
AdminPurgeCommunity, ModAddCommunity, ModAddCommunityForm, ModAddForm, ModBan, ModBanForm, ModBanFromCommunity,
AdminPurgeCommunityForm, ModBanFromCommunityForm, ModFeaturePost, ModFeaturePostForm, ModHideCommunity,
AdminPurgePerson, ModHideCommunityForm, ModLockPost, ModLockPostForm, ModRemoveComment, ModRemoveCommentForm,
AdminPurgePersonForm, ModRemoveCommunity, ModRemoveCommunityForm, ModRemovePost, ModRemovePostForm,
AdminPurgePost, ModTransferCommunity, ModTransferCommunityForm,
AdminPurgePostForm,
ModAdd,
ModAddCommunity,
ModAddCommunityForm,
ModAddForm,
ModBan,
ModBanForm,
ModBanFromCommunity,
ModBanFromCommunityForm,
ModFeaturePost,
ModFeaturePostForm,
ModHideCommunity,
ModHideCommunityForm,
ModLockPost,
ModLockPostForm,
ModRemoveComment,
ModRemoveCommentForm,
ModRemoveCommunity,
ModRemoveCommunityForm,
ModRemovePost,
ModRemovePostForm,
ModTransferCommunity,
ModTransferCommunityForm,
}, },
traits::Crud, traits::Crud,
utils::{get_conn, DbPool}, utils::{get_conn, DbPool},
@ -475,24 +452,10 @@ mod tests {
community::{Community, CommunityInsertForm}, community::{Community, CommunityInsertForm},
instance::Instance, instance::Instance,
moderator::{ moderator::{
ModAdd, ModAdd, ModAddCommunity, ModAddCommunityForm, ModAddForm, ModBan, ModBanForm,
ModAddCommunity, ModBanFromCommunity, ModBanFromCommunityForm, ModFeaturePost, ModFeaturePostForm,
ModAddCommunityForm, ModLockPost, ModLockPostForm, ModRemoveComment, ModRemoveCommentForm, ModRemoveCommunity,
ModAddForm, ModRemoveCommunityForm, ModRemovePost, ModRemovePostForm,
ModBan,
ModBanForm,
ModBanFromCommunity,
ModBanFromCommunityForm,
ModFeaturePost,
ModFeaturePostForm,
ModLockPost,
ModLockPostForm,
ModRemoveComment,
ModRemoveCommentForm,
ModRemoveCommunity,
ModRemoveCommunityForm,
ModRemovePost,
ModRemovePostForm,
}, },
person::{Person, PersonInsertForm}, person::{Person, PersonInsertForm},
post::{Post, PostInsertForm}, post::{Post, PostInsertForm},

View File

@ -9,9 +9,7 @@ use diesel::{
dsl::{insert_into, now, IntervalDsl}, dsl::{insert_into, now, IntervalDsl},
result::Error, result::Error,
sql_types::Timestamptz, sql_types::Timestamptz,
ExpressionMethods, ExpressionMethods, IntoSql, QueryDsl,
IntoSql,
QueryDsl,
}; };
use diesel_async::RunQueryDsl; use diesel_async::RunQueryDsl;

View File

@ -2,11 +2,7 @@ use crate::{
newtypes::{CommunityId, DbUrl, PersonId}, newtypes::{CommunityId, DbUrl, PersonId},
schema::{instance, local_user, person, person_follower}, schema::{instance, local_user, person, person_follower},
source::person::{ source::person::{
Person, Person, PersonFollower, PersonFollowerForm, PersonInsertForm, PersonUpdateForm,
PersonFollower,
PersonFollowerForm,
PersonInsertForm,
PersonUpdateForm,
}, },
traits::{ApubActor, Crud, Followable}, traits::{ApubActor, Crud, Followable},
utils::{functions::lower, get_conn, naive_now, DbPool}, utils::{functions::lower, get_conn, naive_now, DbPool},

View File

@ -2,30 +2,11 @@ use super::instance::coalesce;
use crate::{ use crate::{
newtypes::{CommunityId, DbUrl, PersonId, PostId}, newtypes::{CommunityId, DbUrl, PersonId, PostId},
schema::post::dsl::{ schema::post::dsl::{
ap_id, ap_id, body, community_id, creator_id, deleted, featured_community, local, name, post,
body, published, removed, thumbnail_url, updated, url,
community_id,
creator_id,
deleted,
featured_community,
local,
name,
post,
published,
removed,
thumbnail_url,
updated,
url,
}, },
source::post::{ source::post::{
Post, Post, PostInsertForm, PostLike, PostLikeForm, PostRead, PostReadForm, PostSaved, PostSavedForm,
PostInsertForm,
PostLike,
PostLikeForm,
PostRead,
PostReadForm,
PostSaved,
PostSavedForm,
PostUpdateForm, PostUpdateForm,
}, },
traits::{Crud, Likeable, Readable, Saveable}, traits::{Crud, Likeable, Readable, Saveable},
@ -347,15 +328,8 @@ mod tests {
instance::Instance, instance::Instance,
person::{Person, PersonInsertForm}, person::{Person, PersonInsertForm},
post::{ post::{
Post, Post, PostInsertForm, PostLike, PostLikeForm, PostRead, PostReadForm, PostSaved,
PostInsertForm, PostSavedForm, PostUpdateForm,
PostLike,
PostLikeForm,
PostRead,
PostReadForm,
PostSaved,
PostSavedForm,
PostUpdateForm,
}, },
}, },
traits::{Crud, Likeable, Readable, Saveable}, traits::{Crud, Likeable, Readable, Saveable},

Some files were not shown because too many files have changed in this diff Show More