Re-organizing source tables into a different folder.

This commit is contained in:
Dessalines 2020-12-13 12:04:42 -05:00
parent bdd264cd5e
commit f456f5da46
71 changed files with 216 additions and 169 deletions

View file

@ -1,5 +1,5 @@
use jsonwebtoken::{decode, encode, DecodingKey, EncodingKey, Header, TokenData, Validation};
use lemmy_db::user::User_;
use lemmy_db::source::user::User_;
use lemmy_utils::settings::Settings;
use serde::{Deserialize, Serialize};

View file

@ -10,12 +10,9 @@ use crate::{
use actix_web::web::Data;
use lemmy_apub::{ApubLikeableType, ApubObjectType};
use lemmy_db::{
comment::*,
comment_report::*,
comment_view::*,
moderator::*,
post::*,
user::*,
source::{comment::*, moderator::*, post::*, user::*},
views::site_view::SiteView,
Crud,
Likeable,

View file

@ -10,14 +10,10 @@ use actix_web::web::Data;
use anyhow::Context;
use lemmy_apub::ActorType;
use lemmy_db::{
comment::Comment,
comment_view::CommentQueryBuilder,
community::*,
diesel_option_overwrite,
moderator::*,
naive_now,
post::Post,
site::*,
source::{comment::Comment, community::*, moderator::*, post::Post, site::*},
views::{
community_follower_view::CommunityFollowerView,
community_moderator_view::CommunityModeratorView,

View file

@ -1,9 +1,11 @@
use crate::claims::Claims;
use actix_web::{web, web::Data};
use lemmy_db::{
community::{Community, CommunityModerator},
post::Post,
user::User_,
source::{
community::{Community, CommunityModerator},
post::Post,
user::User_,
},
views::community_user_ban_view::CommunityUserBanView,
Crud,
DbPool,

View file

@ -11,10 +11,9 @@ use actix_web::web::Data;
use lemmy_apub::{ApubLikeableType, ApubObjectType};
use lemmy_db::{
comment_view::*,
moderator::*,
naive_now,
post::*,
post_report::*,
source::{moderator::*, post::*},
views::{
community_moderator_view::CommunityModeratorView,
community_view::CommunityView,

View file

@ -11,13 +11,11 @@ use anyhow::Context;
use lemmy_apub::fetcher::search_by_apub_id;
use lemmy_db::{
aggregates::site_aggregates::SiteAggregates,
category::*,
comment_view::*,
diesel_option_overwrite,
moderator::*,
moderator_views::*,
naive_now,
site::*,
source::{category::*, moderator::*, site::*},
views::{
community_view::CommunityQueryBuilder,
post_view::PostQueryBuilder,

View file

@ -15,21 +15,23 @@ use captcha::{gen, Difficulty};
use chrono::Duration;
use lemmy_apub::ApubObjectType;
use lemmy_db::{
comment::*,
comment_report::CommentReportView,
comment_view::*,
community::*,
diesel_option_overwrite,
moderator::*,
naive_now,
password_reset_request::*,
post::*,
post_report::PostReportView,
private_message::*,
private_message_view::*,
site::*,
user::*,
user_mention::*,
source::{
comment::*,
community::*,
moderator::*,
password_reset_request::*,
post::*,
private_message::*,
site::*,
user::*,
user_mention::*,
},
user_mention_view::*,
views::{
community_follower_view::CommunityFollowerView,

View file

@ -5,9 +5,11 @@ use activitystreams::{
};
use anyhow::Context;
use lemmy_db::{
comment::{Comment, CommentLike, CommentLikeForm},
comment_view::CommentView,
post::Post,
source::{
comment::{Comment, CommentLike, CommentLikeForm},
post::Post,
},
Likeable,
};
use lemmy_structs::{blocking, comment::CommentResponse, send_local_notifs};

View file

@ -1,8 +1,8 @@
use crate::activities::receive::get_actor_as_user;
use activitystreams::activity::{Dislike, Like};
use lemmy_db::{
comment::{Comment, CommentLike},
comment_view::CommentView,
source::comment::{Comment, CommentLike},
Likeable,
};
use lemmy_structs::{blocking, comment::CommentResponse};

View file

@ -4,7 +4,7 @@ use activitystreams::{
base::{AnyBase, ExtendsExt},
};
use anyhow::Context;
use lemmy_db::{community::Community, views::community_view::CommunityView, ApubObject};
use lemmy_db::{source::community::Community, views::community_view::CommunityView, ApubObject};
use lemmy_structs::{blocking, community::CommunityResponse};
use lemmy_utils::{location_info, LemmyError};
use lemmy_websocket::{messages::SendCommunityRoomMessage, LemmyContext, UserOperation};

View file

@ -5,7 +5,7 @@ use activitystreams::{
error::DomainError,
};
use anyhow::{anyhow, Context};
use lemmy_db::user::User_;
use lemmy_db::source::user::User_;
use lemmy_utils::{location_info, LemmyError};
use lemmy_websocket::LemmyContext;
use log::debug;

View file

@ -5,7 +5,7 @@ use activitystreams::{
};
use anyhow::Context;
use lemmy_db::{
post::{Post, PostLike, PostLikeForm},
source::post::{Post, PostLike, PostLikeForm},
views::post_view::PostView,
Likeable,
};

View file

@ -1,7 +1,7 @@
use crate::activities::receive::get_actor_as_user;
use activitystreams::activity::{Dislike, Like};
use lemmy_db::{
post::{Post, PostLike},
source::post::{Post, PostLike},
views::post_view::PostView,
Likeable,
};

View file

@ -13,7 +13,7 @@ use activitystreams::{
public,
};
use anyhow::{anyhow, Context};
use lemmy_db::{private_message::PrivateMessage, private_message_view::PrivateMessageView};
use lemmy_db::{private_message_view::PrivateMessageView, source::private_message::PrivateMessage};
use lemmy_structs::{blocking, user::PrivateMessageResponse};
use lemmy_utils::{location_info, LemmyError};
use lemmy_websocket::{messages::SendUserRoomMessage, LemmyContext, UserOperation};

View file

@ -26,7 +26,11 @@ use activitystreams::{
};
use anyhow::anyhow;
use itertools::Itertools;
use lemmy_db::{comment::Comment, community::Community, post::Post, user::User_, Crud, DbPool};
use lemmy_db::{
source::{comment::Comment, community::Community, post::Post, user::User_},
Crud,
DbPool,
};
use lemmy_structs::{blocking, WebFingerResponse};
use lemmy_utils::{
request::{retry, RecvError},

View file

@ -24,7 +24,7 @@ use activitystreams::{
use anyhow::Context;
use itertools::Itertools;
use lemmy_db::{
community::Community,
source::community::Community,
views::community_follower_view::CommunityFollowerView,
DbPool,
};

View file

@ -21,7 +21,10 @@ use activitystreams::{
prelude::*,
public,
};
use lemmy_db::{community::Community, post::Post, user::User_, Crud};
use lemmy_db::{
source::{community::Community, post::Post, user::User_},
Crud,
};
use lemmy_structs::blocking;
use lemmy_utils::LemmyError;
use lemmy_websocket::LemmyContext;

View file

@ -16,7 +16,10 @@ use activitystreams::{
},
prelude::*,
};
use lemmy_db::{private_message::PrivateMessage, user::User_, Crud};
use lemmy_db::{
source::{private_message::PrivateMessage, user::User_},
Crud,
};
use lemmy_structs::blocking;
use lemmy_utils::LemmyError;
use lemmy_websocket::LemmyContext;

View file

@ -14,8 +14,10 @@ use activitystreams::{
object::ObjectExt,
};
use lemmy_db::{
community::{Community, CommunityFollower, CommunityFollowerForm},
user::User_,
source::{
community::{Community, CommunityFollower, CommunityFollowerForm},
user::User_,
},
ApubObject,
DbPool,
Followable,

View file

@ -19,7 +19,10 @@ use background_jobs::{
WorkerConfig,
};
use itertools::Itertools;
use lemmy_db::{community::Community, user::User_, DbPool};
use lemmy_db::{
source::{community::Community, user::User_},
DbPool,
};
use lemmy_utils::{location_info, settings::Settings, LemmyError};
use lemmy_websocket::LemmyContext;
use log::{debug, warn};

View file

@ -1,7 +1,7 @@
use activitystreams::unparsed::UnparsedMutExt;
use activitystreams_ext::UnparsedExtension;
use diesel::PgConnection;
use lemmy_db::{category::Category, Crud};
use lemmy_db::{source::category::Category, Crud};
use lemmy_utils::LemmyError;
use serde::{Deserialize, Serialize};

View file

@ -13,12 +13,14 @@ use anyhow::{anyhow, Context};
use chrono::NaiveDateTime;
use diesel::result::Error::NotFound;
use lemmy_db::{
comment::Comment,
comment_view::CommentView,
community::{Community, CommunityModerator, CommunityModeratorForm},
naive_now,
post::Post,
user::User_,
source::{
comment::Comment,
community::{Community, CommunityModerator, CommunityModeratorForm},
post::Post,
user::User_,
},
views::{community_view::CommunityView, post_view::PostView, user_view::UserViewSafe},
ApubObject,
Joinable,

View file

@ -4,7 +4,7 @@ use crate::{
};
use actix_web::{body::Body, web, web::Path, HttpResponse};
use diesel::result::Error::NotFound;
use lemmy_db::{comment::Comment, Crud};
use lemmy_db::{source::comment::Comment, Crud};
use lemmy_structs::blocking;
use lemmy_utils::LemmyError;
use lemmy_websocket::LemmyContext;

View file

@ -10,8 +10,7 @@ use activitystreams::{
};
use actix_web::{body::Body, web, HttpResponse};
use lemmy_db::{
community::Community,
post::Post,
source::{community::Community, post::Post},
views::community_follower_view::CommunityFollowerView,
};
use lemmy_structs::blocking;

View file

@ -1,6 +1,6 @@
use crate::APUB_JSON_CONTENT_TYPE;
use actix_web::{body::Body, web, HttpResponse};
use lemmy_db::activity::Activity;
use lemmy_db::source::activity::Activity;
use lemmy_structs::blocking;
use lemmy_utils::{settings::Settings, LemmyError};
use lemmy_websocket::LemmyContext;

View file

@ -4,7 +4,7 @@ use crate::{
};
use actix_web::{body::Body, web, HttpResponse};
use diesel::result::Error::NotFound;
use lemmy_db::post::Post;
use lemmy_db::source::post::Post;
use lemmy_structs::blocking;
use lemmy_utils::LemmyError;
use lemmy_websocket::LemmyContext;

View file

@ -9,7 +9,7 @@ use activitystreams::{
collection::{CollectionExt, OrderedCollection},
};
use actix_web::{body::Body, web, HttpResponse};
use lemmy_db::user::User_;
use lemmy_db::source::user::User_;
use lemmy_structs::blocking;
use lemmy_utils::LemmyError;
use lemmy_websocket::LemmyContext;

View file

@ -27,8 +27,10 @@ use activitystreams::{
use actix_web::{web, HttpRequest, HttpResponse};
use anyhow::{anyhow, Context};
use lemmy_db::{
community::{Community, CommunityFollower, CommunityFollowerForm},
user::User_,
source::{
community::{Community, CommunityFollower, CommunityFollowerForm},
user::User_,
},
views::community_user_ban_view::CommunityUserBanView,
ApubObject,
DbPool,

View file

@ -12,7 +12,11 @@ use activitystreams::{
};
use actix_web::HttpRequest;
use anyhow::{anyhow, Context};
use lemmy_db::{activity::Activity, community::Community, user::User_, ApubObject, DbPool};
use lemmy_db::{
source::{activity::Activity, community::Community, user::User_},
ApubObject,
DbPool,
};
use lemmy_structs::blocking;
use lemmy_utils::{location_info, settings::Settings, LemmyError};
use lemmy_websocket::LemmyContext;

View file

@ -41,7 +41,11 @@ use activitystreams::{
};
use anyhow::Context;
use diesel::result::Error::NotFound;
use lemmy_db::{comment::Comment, post::Post, site::Site, ApubObject, Crud};
use lemmy_db::{
source::{comment::Comment, post::Post, site::Site},
ApubObject,
Crud,
};
use lemmy_structs::blocking;
use lemmy_utils::{location_info, LemmyError};
use lemmy_websocket::LemmyContext;

View file

@ -15,7 +15,7 @@ use crate::{
use activitystreams::{activity::ActorAndObject, prelude::*};
use actix_web::{web, HttpRequest, HttpResponse};
use anyhow::Context;
use lemmy_db::{community::Community, ApubObject, DbPool};
use lemmy_db::{source::community::Community, ApubObject, DbPool};
use lemmy_structs::blocking;
use lemmy_utils::{location_info, LemmyError};
use lemmy_websocket::LemmyContext;

View file

@ -49,9 +49,11 @@ use actix_web::{web, HttpRequest, HttpResponse};
use anyhow::{anyhow, Context};
use diesel::NotFound;
use lemmy_db::{
community::{Community, CommunityFollower},
private_message::PrivateMessage,
user::User_,
source::{
community::{Community, CommunityFollower},
private_message::PrivateMessage,
user::User_,
},
ApubObject,
Followable,
};

View file

@ -22,7 +22,10 @@ use activitystreams::{
};
use activitystreams_ext::{Ext1, Ext2};
use anyhow::{anyhow, Context};
use lemmy_db::{activity::Activity, user::User_, DbPool};
use lemmy_db::{
source::{activity::Activity, user::User_},
DbPool,
};
use lemmy_structs::blocking;
use lemmy_utils::{location_info, settings::Settings, LemmyError};
use lemmy_websocket::LemmyContext;

View file

@ -24,10 +24,12 @@ use activitystreams::{
};
use anyhow::{anyhow, Context};
use lemmy_db::{
comment::{Comment, CommentForm},
community::Community,
post::Post,
user::User_,
source::{
comment::{Comment, CommentForm},
community::Community,
post::Post,
user::User_,
},
Crud,
DbPool,
};

View file

@ -23,8 +23,8 @@ use activitystreams::{
use activitystreams_ext::Ext2;
use anyhow::Context;
use lemmy_db::{
community::{Community, CommunityForm},
naive_now,
source::community::{Community, CommunityForm},
views::community_moderator_view::CommunityModeratorView,
DbPool,
};

View file

@ -21,9 +21,11 @@ use activitystreams::{
use activitystreams_ext::Ext1;
use anyhow::Context;
use lemmy_db::{
community::Community,
post::{Post, PostForm},
user::User_,
source::{
community::Community,
post::{Post, PostForm},
user::User_,
},
Crud,
DbPool,
};

View file

@ -20,8 +20,10 @@ use activitystreams::{
};
use anyhow::Context;
use lemmy_db::{
private_message::{PrivateMessage, PrivateMessageForm},
user::User_,
source::{
private_message::{PrivateMessage, PrivateMessageForm},
user::User_,
},
Crud,
DbPool,
};

View file

@ -20,7 +20,7 @@ use activitystreams_ext::Ext1;
use anyhow::Context;
use lemmy_db::{
naive_now,
user::{UserForm, User_},
source::user::{UserForm, User_},
ApubObject,
DbPool,
};

View file

@ -24,11 +24,13 @@ impl CommunityAggregates {
mod tests {
use crate::{
aggregates::community_aggregates::CommunityAggregates,
comment::{Comment, CommentForm},
community::{Community, CommunityFollower, CommunityFollowerForm, CommunityForm},
post::{Post, PostForm},
source::{
comment::{Comment, CommentForm},
community::{Community, CommunityFollower, CommunityFollowerForm, CommunityForm},
post::{Post, PostForm},
user::{UserForm, User_},
},
tests::establish_unpooled_connection,
user::{UserForm, User_},
Crud,
Followable,
ListingType,

View file

@ -26,11 +26,13 @@ impl PostAggregates {
mod tests {
use crate::{
aggregates::post_aggregates::PostAggregates,
comment::{Comment, CommentForm},
community::{Community, CommunityForm},
post::{Post, PostForm, PostLike, PostLikeForm},
source::{
comment::{Comment, CommentForm},
community::{Community, CommunityForm},
post::{Post, PostForm, PostLike, PostLikeForm},
user::{UserForm, User_},
},
tests::establish_unpooled_connection,
user::{UserForm, User_},
Crud,
Likeable,
ListingType,

View file

@ -22,11 +22,13 @@ impl SiteAggregates {
mod tests {
use crate::{
aggregates::site_aggregates::SiteAggregates,
comment::{Comment, CommentForm},
community::{Community, CommunityForm},
post::{Post, PostForm},
source::{
comment::{Comment, CommentForm},
community::{Community, CommunityForm},
post::{Post, PostForm},
user::{UserForm, User_},
},
tests::establish_unpooled_connection,
user::{UserForm, User_},
Crud,
ListingType,
SortType,

View file

@ -25,11 +25,13 @@ impl UserAggregates {
mod tests {
use crate::{
aggregates::user_aggregates::UserAggregates,
comment::{Comment, CommentForm, CommentLike, CommentLikeForm},
community::{Community, CommunityForm},
post::{Post, PostForm, PostLike, PostLikeForm},
source::{
comment::{Comment, CommentForm, CommentLike, CommentLikeForm},
community::{Community, CommunityForm},
post::{Post, PostForm, PostLike, PostLikeForm},
user::{UserForm, User_},
},
tests::establish_unpooled_connection,
user::{UserForm, User_},
Crud,
Likeable,
ListingType,

View file

@ -2,10 +2,10 @@ use diesel::{dsl::*, pg::Pg, result::Error, *};
use serde::{Deserialize, Serialize};
use crate::{
comment::Comment,
limit_and_offset,
naive_now,
schema::comment_report,
source::comment::Comment,
MaybeOptional,
Reportable,
};

View file

@ -497,12 +497,9 @@ impl<'a> ReplyQueryBuilder<'a> {
#[cfg(test)]
mod tests {
use crate::{
comment::*,
comment_view::*,
community::*,
post::*,
source::{comment::*, community::*, post::*, user::*},
tests::establish_unpooled_connection,
user::*,
Crud,
Likeable,
*,

View file

@ -11,25 +11,16 @@ use regex::Regex;
use serde::{Deserialize, Serialize};
use std::{env, env::VarError};
pub mod activity;
pub mod aggregates;
pub mod category;
pub mod comment;
pub mod comment_report;
pub mod comment_view;
pub mod community;
pub mod moderator;
pub mod moderator_views;
pub mod password_reset_request;
pub mod post;
pub mod post_report;
pub mod private_message;
pub mod private_message_view;
pub mod schema;
pub mod site;
pub mod user;
pub mod user_mention;
pub mod user_mention_view;
pub mod aggregates;
pub mod schema;
pub mod source;
pub mod views;
pub type DbPool = diesel::r2d2::Pool<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;

View file

@ -4,8 +4,8 @@ use serde::{Deserialize, Serialize};
use crate::{
limit_and_offset,
naive_now,
post::Post,
schema::post_report,
source::post::Post,
MaybeOptional,
Reportable,
};

View file

@ -97,9 +97,11 @@ impl Activity {
#[cfg(test)]
mod tests {
use crate::{
activity::{Activity, ActivityForm},
source::{
activity::{Activity, ActivityForm},
user::{UserForm, User_},
},
tests::establish_unpooled_connection,
user::{UserForm, User_},
Crud,
ListingType,
SortType,

View file

@ -48,7 +48,7 @@ impl Category {
#[cfg(test)]
mod tests {
use crate::{category::Category, tests::establish_unpooled_connection};
use crate::{source::category::Category, tests::establish_unpooled_connection};
#[test]
fn test_crud() {

View file

@ -260,11 +260,8 @@ impl Saveable<CommentSavedForm> for CommentSaved {
#[cfg(test)]
mod tests {
use crate::{
comment::*,
community::*,
post::*,
source::{comment::*, community::*, post::*, user::*},
tests::establish_unpooled_connection,
user::*,
Crud,
ListingType,
SortType,

View file

@ -55,7 +55,7 @@ pub struct CommunitySafe {
}
mod safe_type {
use crate::{community::Community, schema::community::columns::*, ToSafe};
use crate::{schema::community::columns::*, source::community::Community, ToSafe};
type Columns = (
id,
name,
@ -415,7 +415,12 @@ impl Followable<CommunityFollowerForm> for CommunityFollower {
#[cfg(test)]
mod tests {
use crate::{community::*, tests::establish_unpooled_connection, user::*, ListingType, SortType};
use crate::{
source::{community::*, user::*},
tests::establish_unpooled_connection,
ListingType,
SortType,
};
#[test]
fn test_crud() {

View file

@ -0,0 +1,11 @@
pub mod activity;
pub mod category;
pub mod comment;
pub mod community;
pub mod moderator;
pub mod password_reset_request;
pub mod post;
pub mod private_message;
pub mod site;
pub mod user;
pub mod user_mention;

View file

@ -392,12 +392,8 @@ impl Crud<ModAddForm> for ModAdd {
#[cfg(test)]
mod tests {
use crate::{
comment::*,
community::*,
moderator::*,
post::*,
source::{comment::*, community::*, moderator::*, post::*, user::*},
tests::establish_unpooled_connection,
user::*,
ListingType,
SortType,
};

View file

@ -80,7 +80,7 @@ impl PasswordResetRequest {
mod tests {
use super::super::user::*;
use crate::{
password_reset_request::PasswordResetRequest,
source::password_reset_request::PasswordResetRequest,
tests::establish_unpooled_connection,
Crud,
ListingType,

View file

@ -332,10 +332,8 @@ impl Readable<PostReadForm> for PostRead {
#[cfg(test)]
mod tests {
use crate::{
community::*,
post::*,
source::{community::*, post::*, user::*},
tests::establish_unpooled_connection,
user::*,
ListingType,
SortType,
};

View file

@ -138,9 +138,8 @@ impl PrivateMessage {
#[cfg(test)]
mod tests {
use crate::{
private_message::*,
source::{private_message::*, user::*},
tests::establish_unpooled_connection,
user::*,
ListingType,
SortType,
};

View file

@ -62,7 +62,7 @@ pub struct UserSafe {
}
mod safe_type {
use crate::{schema::user_::columns::*, user::User_, ToSafe};
use crate::{schema::user_::columns::*, source::user::User_, ToSafe};
type Columns = (
id,
name,
@ -275,7 +275,7 @@ impl User_ {
#[cfg(test)]
mod tests {
use crate::{tests::establish_unpooled_connection, user::*, ListingType, SortType};
use crate::{source::user::*, tests::establish_unpooled_connection, ListingType, SortType};
#[test]
fn test_crud() {

View file

@ -73,12 +73,8 @@ impl UserMention {
#[cfg(test)]
mod tests {
use crate::{
comment::*,
community::*,
post::*,
source::{comment::*, community::*, post::*, user::*, user_mention::*},
tests::establish_unpooled_connection,
user::*,
user_mention::*,
ListingType,
SortType,
};

View file

@ -1,7 +1,9 @@
use crate::{
community::{Community, CommunitySafe},
schema::{community, community_follower, user_},
user::{UserSafe, User_},
source::{
community::{Community, CommunitySafe},
user::{UserSafe, User_},
},
views::ViewToVec,
ToSafe,
};

View file

@ -1,7 +1,9 @@
use crate::{
community::{Community, CommunitySafe},
schema::{community, community_moderator, user_},
user::{UserSafe, User_},
source::{
community::{Community, CommunitySafe},
user::{UserSafe, User_},
},
views::ViewToVec,
ToSafe,
};

View file

@ -1,7 +1,9 @@
use crate::{
community::{Community, CommunitySafe},
schema::{community, community_user_ban, user_},
user::{UserSafe, User_},
source::{
community::{Community, CommunitySafe},
user::{UserSafe, User_},
},
ToSafe,
};
use diesel::{result::Error, *};

View file

@ -1,12 +1,14 @@
use crate::{
aggregates::community_aggregates::CommunityAggregates,
category::Category,
community::{Community, CommunityFollower, CommunitySafe},
functions::hot_rank,
fuzzy_search,
limit_and_offset,
schema::{category, community, community_aggregates, community_follower, user_},
user::{UserSafe, User_},
source::{
category::Category,
community::{Community, CommunityFollower, CommunitySafe},
user::{UserSafe, User_},
},
views::ViewToVec,
MaybeOptional,
SortType,

View file

@ -1,10 +1,8 @@
use crate::{
aggregates::post_aggregates::PostAggregates,
community::{Community, CommunityFollower, CommunitySafe, CommunityUserBan},
functions::hot_rank,
fuzzy_search,
limit_and_offset,
post::{Post, PostRead, PostSaved},
schema::{
community,
community_follower,
@ -16,7 +14,11 @@ use crate::{
post_saved,
user_,
},
user::{UserSafe, User_},
source::{
community::{Community, CommunityFollower, CommunitySafe, CommunityUserBan},
post::{Post, PostRead, PostSaved},
user::{UserSafe, User_},
},
views::ViewToVec,
ListingType,
MaybeOptional,
@ -589,10 +591,8 @@ impl ViewToVec for PostView {
mod tests {
use crate::{
aggregates::post_aggregates::PostAggregates,
community::*,
post::*,
source::{community::*, post::*, user::*},
tests::establish_unpooled_connection,
user::*,
views::post_view::{PostQueryBuilder, PostView},
Crud,
Likeable,

View file

@ -1,7 +1,9 @@
use crate::{
schema::{site, user_},
site::Site,
user::{UserSafe, User_},
source::{
site::Site,
user::{UserSafe, User_},
},
ToSafe,
};
use diesel::{result::Error, *};

View file

@ -3,7 +3,7 @@ use crate::{
fuzzy_search,
limit_and_offset,
schema::{user_, user_aggregates},
user::{UserSafe, User_},
source::user::{UserSafe, User_},
views::ViewToVec,
MaybeOptional,
SortType,

View file

@ -7,10 +7,12 @@ pub mod websocket;
use diesel::PgConnection;
use lemmy_db::{
comment::Comment,
post::Post,
user::User_,
user_mention::{UserMention, UserMentionForm},
source::{
comment::Comment,
post::Post,
user::User_,
user_mention::{UserMention, UserMentionForm},
},
Crud,
DbPool,
};

View file

@ -1,9 +1,8 @@
use lemmy_db::{
aggregates::site_aggregates::SiteAggregates,
category::*,
comment_view::*,
moderator_views::*,
user::*,
source::{category::*, user::*},
views::{
community_view::CommunityView,
post_view::PostView,

View file

@ -4,12 +4,14 @@ use diesel::{
*,
};
use lemmy_db::{
comment::Comment,
community::{Community, CommunityForm},
naive_now,
post::Post,
private_message::PrivateMessage,
user::{UserForm, User_},
source::{
comment::Comment,
community::{Community, CommunityForm},
post::Post,
private_message::PrivateMessage,
user::{UserForm, User_},
},
Crud,
};
use lemmy_utils::{

View file

@ -5,8 +5,7 @@ use diesel::PgConnection;
use lemmy_api::claims::Claims;
use lemmy_db::{
comment_view::{ReplyQueryBuilder, ReplyView},
community::Community,
user::User_,
source::{community::Community, user::User_},
user_mention_view::{UserMentionQueryBuilder, UserMentionView},
views::{
post_view::{PostQueryBuilder, PostView},

View file

@ -1,6 +1,6 @@
use actix_web::{error::ErrorBadRequest, web::Query, *};
use anyhow::anyhow;
use lemmy_db::{community::Community, user::User_};
use lemmy_db::source::{community::Community, user::User_};
use lemmy_structs::{blocking, WebFingerLink, WebFingerResponse};
use lemmy_utils::{
settings::Settings,

View file

@ -29,8 +29,10 @@ use lemmy_apub::{
},
};
use lemmy_db::{
community::{Community, CommunityForm},
user::{User_, *},
source::{
community::{Community, CommunityForm},
user::{User_, *},
},
Crud,
ListingType,
SortType,