Running cargo fmt.

This commit is contained in:
Dessalines 2020-09-16 08:31:30 -05:00
parent 3fbc8b130d
commit 96535366c3
29 changed files with 106 additions and 106 deletions

View file

@ -11,12 +11,6 @@ use crate::{
LemmyContext, LemmyContext,
}; };
use actix_web::web::Data; use actix_web::web::Data;
use lemmy_structs::{
blocking,
comment::*,
send_local_notifs,
websocket::{SendComment, UserOperation},
};
use lemmy_db::{ use lemmy_db::{
comment::*, comment::*,
comment_view::*, comment_view::*,
@ -30,6 +24,12 @@ use lemmy_db::{
Saveable, Saveable,
SortType, SortType,
}; };
use lemmy_structs::{
blocking,
comment::*,
send_local_notifs,
websocket::{SendComment, UserOperation},
};
use lemmy_utils::{ use lemmy_utils::{
apub::{make_apub_endpoint, EndpointType}, apub::{make_apub_endpoint, EndpointType},
utils::{remove_slurs, scrape_text_for_mentions}, utils::{remove_slurs, scrape_text_for_mentions},

View file

@ -5,16 +5,6 @@ use crate::{
}; };
use actix_web::web::Data; use actix_web::web::Data;
use anyhow::Context; use anyhow::Context;
use lemmy_structs::{
blocking,
community::*,
websocket::{
GetCommunityUsersOnline,
JoinCommunityRoom,
SendCommunityRoomMessage,
UserOperation,
},
};
use lemmy_db::{ use lemmy_db::{
comment::Comment, comment::Comment,
comment_view::CommentQueryBuilder, comment_view::CommentQueryBuilder,
@ -32,6 +22,16 @@ use lemmy_db::{
Joinable, Joinable,
SortType, SortType,
}; };
use lemmy_structs::{
blocking,
community::*,
websocket::{
GetCommunityUsersOnline,
JoinCommunityRoom,
SendCommunityRoomMessage,
UserOperation,
},
};
use lemmy_utils::{ use lemmy_utils::{
apub::{generate_actor_keypair, make_apub_endpoint, EndpointType}, apub::{generate_actor_keypair, make_apub_endpoint, EndpointType},
location_info, location_info,

View file

@ -1,6 +1,5 @@
use crate::{api::claims::Claims, DbPool, LemmyContext}; use crate::{api::claims::Claims, DbPool, LemmyContext};
use actix_web::web::Data; use actix_web::web::Data;
use lemmy_structs::blocking;
use lemmy_db::{ use lemmy_db::{
community::Community, community::Community,
community_view::CommunityUserBanView, community_view::CommunityUserBanView,
@ -8,6 +7,7 @@ use lemmy_db::{
user::User_, user::User_,
Crud, Crud,
}; };
use lemmy_structs::blocking;
use lemmy_utils::{APIError, ConnectionId, LemmyError}; use lemmy_utils::{APIError, ConnectionId, LemmyError};
pub mod claims; pub mod claims;

View file

@ -5,11 +5,6 @@ use crate::{
LemmyContext, LemmyContext,
}; };
use actix_web::web::Data; use actix_web::web::Data;
use lemmy_structs::{
blocking,
post::*,
websocket::{GetPostUsersOnline, JoinPostRoom, SendPost, UserOperation},
};
use lemmy_db::{ use lemmy_db::{
comment_view::*, comment_view::*,
community_view::*, community_view::*,
@ -24,6 +19,11 @@ use lemmy_db::{
Saveable, Saveable,
SortType, SortType,
}; };
use lemmy_structs::{
blocking,
post::*,
websocket::{GetPostUsersOnline, JoinPostRoom, SendPost, UserOperation},
};
use lemmy_utils::{ use lemmy_utils::{
apub::{make_apub_endpoint, EndpointType}, apub::{make_apub_endpoint, EndpointType},
utils::{check_slurs, check_slurs_opt, is_valid_post_title}, utils::{check_slurs, check_slurs_opt, is_valid_post_title},

View file

@ -6,12 +6,6 @@ use crate::{
}; };
use actix_web::web::Data; use actix_web::web::Data;
use anyhow::Context; use anyhow::Context;
use lemmy_structs::{
blocking,
site::*,
user::Register,
websocket::{GetUsersOnline, SendAllMessage, UserOperation},
};
use lemmy_db::{ use lemmy_db::{
category::*, category::*,
comment_view::*, comment_view::*,
@ -28,6 +22,12 @@ use lemmy_db::{
SearchType, SearchType,
SortType, SortType,
}; };
use lemmy_structs::{
blocking,
site::*,
user::Register,
websocket::{GetUsersOnline, SendAllMessage, UserOperation},
};
use lemmy_utils::{ use lemmy_utils::{
location_info, location_info,
settings::Settings, settings::Settings,

View file

@ -9,18 +9,6 @@ use anyhow::Context;
use bcrypt::verify; use bcrypt::verify;
use captcha::{gen, Difficulty}; use captcha::{gen, Difficulty};
use chrono::Duration; use chrono::Duration;
use lemmy_structs::{
blocking,
user::*,
websocket::{
CaptchaItem,
CheckCaptcha,
JoinUserRoom,
SendAllMessage,
SendUserRoomMessage,
UserOperation,
},
};
use lemmy_db::{ use lemmy_db::{
comment::*, comment::*,
comment_view::*, comment_view::*,
@ -46,6 +34,18 @@ use lemmy_db::{
ListingType, ListingType,
SortType, SortType,
}; };
use lemmy_structs::{
blocking,
user::*,
websocket::{
CaptchaItem,
CheckCaptcha,
JoinUserRoom,
SendAllMessage,
SendUserRoomMessage,
UserOperation,
},
};
use lemmy_utils::{ use lemmy_utils::{
apub::{generate_actor_keypair, make_apub_endpoint, EndpointType}, apub::{generate_actor_keypair, make_apub_endpoint, EndpointType},
email::send_email, email::send_email,

View file

@ -40,7 +40,6 @@ use activitystreams::{
use actix_web::{body::Body, web, web::Path, HttpResponse}; use actix_web::{body::Body, web, web::Path, HttpResponse};
use anyhow::Context; use anyhow::Context;
use itertools::Itertools; use itertools::Itertools;
use lemmy_structs::blocking;
use lemmy_db::{ use lemmy_db::{
comment::{Comment, CommentForm}, comment::{Comment, CommentForm},
community::Community, community::Community,
@ -48,6 +47,7 @@ use lemmy_db::{
user::User_, user::User_,
Crud, Crud,
}; };
use lemmy_structs::blocking;
use lemmy_utils::{ use lemmy_utils::{
location_info, location_info,
utils::{convert_datetime, remove_slurs, scrape_text_for_mentions, MentionData}, utils::{convert_datetime, remove_slurs, scrape_text_for_mentions, MentionData},

View file

@ -38,7 +38,6 @@ use activitystreams_ext::Ext2;
use actix_web::{body::Body, web, HttpResponse}; use actix_web::{body::Body, web, HttpResponse};
use anyhow::Context; use anyhow::Context;
use itertools::Itertools; use itertools::Itertools;
use lemmy_structs::blocking;
use lemmy_db::{ use lemmy_db::{
community::{Community, CommunityForm}, community::{Community, CommunityForm},
community_view::{CommunityFollowerView, CommunityModeratorView}, community_view::{CommunityFollowerView, CommunityModeratorView},
@ -46,6 +45,7 @@ use lemmy_db::{
post::Post, post::Post,
user::User_, user::User_,
}; };
use lemmy_structs::blocking;
use lemmy_utils::{ use lemmy_utils::{
apub::get_apub_protocol_string, apub::get_apub_protocol_string,
location_info, location_info,

View file

@ -15,7 +15,6 @@ use activitystreams::{base::BaseExt, collection::OrderedCollection, object::Note
use anyhow::{anyhow, Context}; use anyhow::{anyhow, Context};
use chrono::NaiveDateTime; use chrono::NaiveDateTime;
use diesel::result::Error::NotFound; use diesel::result::Error::NotFound;
use lemmy_structs::{blocking, site::SearchResponse};
use lemmy_db::{ use lemmy_db::{
comment::{Comment, CommentForm}, comment::{Comment, CommentForm},
comment_view::CommentView, comment_view::CommentView,
@ -30,6 +29,7 @@ use lemmy_db::{
Joinable, Joinable,
SearchType, SearchType,
}; };
use lemmy_structs::{blocking, site::SearchResponse};
use lemmy_utils::{apub::get_apub_protocol_string, location_info, LemmyError}; use lemmy_utils::{apub::get_apub_protocol_string, location_info, LemmyError};
use log::debug; use log::debug;
use reqwest::Client; use reqwest::Client;

View file

@ -14,6 +14,12 @@ use crate::{
use activitystreams::{activity::Create, base::AnyBase, object::Note, prelude::*}; use activitystreams::{activity::Create, base::AnyBase, object::Note, prelude::*};
use actix_web::HttpResponse; use actix_web::HttpResponse;
use anyhow::Context; use anyhow::Context;
use lemmy_db::{
comment::{Comment, CommentForm},
comment_view::CommentView,
post::{Post, PostForm},
post_view::PostView,
};
use lemmy_structs::{ use lemmy_structs::{
blocking, blocking,
comment::CommentResponse, comment::CommentResponse,
@ -21,12 +27,6 @@ use lemmy_structs::{
send_local_notifs, send_local_notifs,
websocket::{SendComment, SendPost, UserOperation}, websocket::{SendComment, SendPost, UserOperation},
}; };
use lemmy_db::{
comment::{Comment, CommentForm},
comment_view::CommentView,
post::{Post, PostForm},
post_view::PostView,
};
use lemmy_utils::{location_info, utils::scrape_text_for_mentions, LemmyError}; use lemmy_utils::{location_info, utils::scrape_text_for_mentions, LemmyError};
pub async fn receive_create( pub async fn receive_create(

View file

@ -16,13 +16,6 @@ use crate::{
use activitystreams::{activity::Delete, base::AnyBase, object::Note, prelude::*}; use activitystreams::{activity::Delete, base::AnyBase, object::Note, prelude::*};
use actix_web::HttpResponse; use actix_web::HttpResponse;
use anyhow::Context; use anyhow::Context;
use lemmy_structs::{
blocking,
comment::CommentResponse,
community::CommunityResponse,
post::PostResponse,
websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
};
use lemmy_db::{ use lemmy_db::{
comment::{Comment, CommentForm}, comment::{Comment, CommentForm},
comment_view::CommentView, comment_view::CommentView,
@ -33,6 +26,13 @@ use lemmy_db::{
post_view::PostView, post_view::PostView,
Crud, Crud,
}; };
use lemmy_structs::{
blocking,
comment::CommentResponse,
community::CommunityResponse,
post::PostResponse,
websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
};
use lemmy_utils::{location_info, LemmyError}; use lemmy_utils::{location_info, LemmyError};
pub async fn receive_delete( pub async fn receive_delete(

View file

@ -14,12 +14,6 @@ use crate::{
use activitystreams::{activity::Dislike, base::AnyBase, object::Note, prelude::*}; use activitystreams::{activity::Dislike, base::AnyBase, object::Note, prelude::*};
use actix_web::HttpResponse; use actix_web::HttpResponse;
use anyhow::Context; use anyhow::Context;
use lemmy_structs::{
blocking,
comment::CommentResponse,
post::PostResponse,
websocket::{SendComment, SendPost, UserOperation},
};
use lemmy_db::{ use lemmy_db::{
comment::{CommentForm, CommentLike, CommentLikeForm}, comment::{CommentForm, CommentLike, CommentLikeForm},
comment_view::CommentView, comment_view::CommentView,
@ -27,6 +21,12 @@ use lemmy_db::{
post_view::PostView, post_view::PostView,
Likeable, Likeable,
}; };
use lemmy_structs::{
blocking,
comment::CommentResponse,
post::PostResponse,
websocket::{SendComment, SendPost, UserOperation},
};
use lemmy_utils::{location_info, LemmyError}; use lemmy_utils::{location_info, LemmyError};
pub async fn receive_dislike( pub async fn receive_dislike(

View file

@ -14,12 +14,6 @@ use crate::{
use activitystreams::{activity::Like, base::AnyBase, object::Note, prelude::*}; use activitystreams::{activity::Like, base::AnyBase, object::Note, prelude::*};
use actix_web::HttpResponse; use actix_web::HttpResponse;
use anyhow::Context; use anyhow::Context;
use lemmy_structs::{
blocking,
comment::CommentResponse,
post::PostResponse,
websocket::{SendComment, SendPost, UserOperation},
};
use lemmy_db::{ use lemmy_db::{
comment::{CommentForm, CommentLike, CommentLikeForm}, comment::{CommentForm, CommentLike, CommentLikeForm},
comment_view::CommentView, comment_view::CommentView,
@ -27,6 +21,12 @@ use lemmy_db::{
post_view::PostView, post_view::PostView,
Likeable, Likeable,
}; };
use lemmy_structs::{
blocking,
comment::CommentResponse,
post::PostResponse,
websocket::{SendComment, SendPost, UserOperation},
};
use lemmy_utils::{location_info, LemmyError}; use lemmy_utils::{location_info, LemmyError};
pub async fn receive_like( pub async fn receive_like(

View file

@ -17,13 +17,6 @@ use crate::{
use activitystreams::{activity::Remove, base::AnyBase, object::Note, prelude::*}; use activitystreams::{activity::Remove, base::AnyBase, object::Note, prelude::*};
use actix_web::HttpResponse; use actix_web::HttpResponse;
use anyhow::{anyhow, Context}; use anyhow::{anyhow, Context};
use lemmy_structs::{
blocking,
comment::CommentResponse,
community::CommunityResponse,
post::PostResponse,
websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
};
use lemmy_db::{ use lemmy_db::{
comment::{Comment, CommentForm}, comment::{Comment, CommentForm},
comment_view::CommentView, comment_view::CommentView,
@ -34,6 +27,13 @@ use lemmy_db::{
post_view::PostView, post_view::PostView,
Crud, Crud,
}; };
use lemmy_structs::{
blocking,
comment::CommentResponse,
community::CommunityResponse,
post::PostResponse,
websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
};
use lemmy_utils::{location_info, LemmyError}; use lemmy_utils::{location_info, LemmyError};
pub async fn receive_remove( pub async fn receive_remove(

View file

@ -21,13 +21,6 @@ use activitystreams::{
}; };
use actix_web::HttpResponse; use actix_web::HttpResponse;
use anyhow::{anyhow, Context}; use anyhow::{anyhow, Context};
use lemmy_structs::{
blocking,
comment::CommentResponse,
community::CommunityResponse,
post::PostResponse,
websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
};
use lemmy_db::{ use lemmy_db::{
comment::{Comment, CommentForm, CommentLike}, comment::{Comment, CommentForm, CommentLike},
comment_view::CommentView, comment_view::CommentView,
@ -39,6 +32,13 @@ use lemmy_db::{
Crud, Crud,
Likeable, Likeable,
}; };
use lemmy_structs::{
blocking,
comment::CommentResponse,
community::CommunityResponse,
post::PostResponse,
websocket::{SendComment, SendCommunityRoomMessage, SendPost, UserOperation},
};
use lemmy_utils::{location_info, LemmyError}; use lemmy_utils::{location_info, LemmyError};
pub async fn receive_undo( pub async fn receive_undo(

View file

@ -15,13 +15,6 @@ use crate::{
use activitystreams::{activity::Update, base::AnyBase, object::Note, prelude::*}; use activitystreams::{activity::Update, base::AnyBase, object::Note, prelude::*};
use actix_web::HttpResponse; use actix_web::HttpResponse;
use anyhow::Context; use anyhow::Context;
use lemmy_structs::{
blocking,
comment::CommentResponse,
post::PostResponse,
send_local_notifs,
websocket::{SendComment, SendPost, UserOperation},
};
use lemmy_db::{ use lemmy_db::{
comment::{Comment, CommentForm}, comment::{Comment, CommentForm},
comment_view::CommentView, comment_view::CommentView,
@ -29,6 +22,13 @@ use lemmy_db::{
post_view::PostView, post_view::PostView,
Crud, Crud,
}; };
use lemmy_structs::{
blocking,
comment::CommentResponse,
post::PostResponse,
send_local_notifs,
websocket::{SendComment, SendPost, UserOperation},
};
use lemmy_utils::{location_info, utils::scrape_text_for_mentions, LemmyError}; use lemmy_utils::{location_info, utils::scrape_text_for_mentions, LemmyError};
pub async fn receive_update( pub async fn receive_update(

View file

@ -15,12 +15,12 @@ use activitystreams::{
}; };
use actix_web::{web, HttpRequest, HttpResponse}; use actix_web::{web, HttpRequest, HttpResponse};
use anyhow::{anyhow, Context}; use anyhow::{anyhow, Context};
use lemmy_structs::blocking;
use lemmy_db::{ use lemmy_db::{
community::{Community, CommunityFollower, CommunityFollowerForm}, community::{Community, CommunityFollower, CommunityFollowerForm},
user::User_, user::User_,
Followable, Followable,
}; };
use lemmy_structs::blocking;
use lemmy_utils::{location_info, LemmyError}; use lemmy_utils::{location_info, LemmyError};
use log::debug; use log::debug;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View file

@ -16,11 +16,6 @@ use activitystreams::{
}; };
use actix_web::{web, HttpRequest, HttpResponse}; use actix_web::{web, HttpRequest, HttpResponse};
use anyhow::Context; use anyhow::Context;
use lemmy_structs::{
blocking,
user::PrivateMessageResponse,
websocket::{SendUserRoomMessage, UserOperation},
};
use lemmy_db::{ use lemmy_db::{
community::{CommunityFollower, CommunityFollowerForm}, community::{CommunityFollower, CommunityFollowerForm},
naive_now, naive_now,
@ -30,6 +25,11 @@ use lemmy_db::{
Crud, Crud,
Followable, Followable,
}; };
use lemmy_structs::{
blocking,
user::PrivateMessageResponse,
websocket::{SendUserRoomMessage, UserOperation},
};
use lemmy_utils::{location_info, LemmyError}; use lemmy_utils::{location_info, LemmyError};
use log::debug; use log::debug;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View file

@ -32,8 +32,8 @@ use activitystreams_ext::{Ext1, Ext2};
use actix_web::{body::Body, HttpResponse}; use actix_web::{body::Body, HttpResponse};
use anyhow::{anyhow, Context}; use anyhow::{anyhow, Context};
use chrono::NaiveDateTime; use chrono::NaiveDateTime;
use lemmy_structs::blocking;
use lemmy_db::{activity::do_insert_activity, user::User_}; use lemmy_db::{activity::do_insert_activity, user::User_};
use lemmy_structs::blocking;
use lemmy_utils::{ use lemmy_utils::{
apub::get_apub_protocol_string, apub::get_apub_protocol_string,
location_info, location_info,

View file

@ -35,13 +35,13 @@ use activitystreams::{
use activitystreams_ext::Ext1; use activitystreams_ext::Ext1;
use actix_web::{body::Body, web, HttpResponse}; use actix_web::{body::Body, web, HttpResponse};
use anyhow::Context; use anyhow::Context;
use lemmy_structs::blocking;
use lemmy_db::{ use lemmy_db::{
community::Community, community::Community,
post::{Post, PostForm}, post::{Post, PostForm},
user::User_, user::User_,
Crud, Crud,
}; };
use lemmy_structs::blocking;
use lemmy_utils::{ use lemmy_utils::{
location_info, location_info,
utils::{check_slurs, convert_datetime, remove_slurs}, utils::{check_slurs, convert_datetime, remove_slurs},

View file

@ -27,12 +27,12 @@ use activitystreams::{
prelude::*, prelude::*,
}; };
use anyhow::Context; use anyhow::Context;
use lemmy_structs::blocking;
use lemmy_db::{ use lemmy_db::{
private_message::{PrivateMessage, PrivateMessageForm}, private_message::{PrivateMessage, PrivateMessageForm},
user::User_, user::User_,
Crud, Crud,
}; };
use lemmy_structs::blocking;
use lemmy_utils::{location_info, utils::convert_datetime, LemmyError}; use lemmy_utils::{location_info, utils::convert_datetime, LemmyError};
use url::Url; use url::Url;

View file

@ -27,11 +27,11 @@ use activitystreams::{
use activitystreams_ext::Ext1; use activitystreams_ext::Ext1;
use actix_web::{body::Body, web, HttpResponse}; use actix_web::{body::Body, web, HttpResponse};
use anyhow::Context; use anyhow::Context;
use lemmy_structs::blocking;
use lemmy_db::{ use lemmy_db::{
naive_now, naive_now,
user::{UserForm, User_}, user::{UserForm, User_},
}; };
use lemmy_structs::blocking;
use lemmy_utils::{ use lemmy_utils::{
location_info, location_info,
utils::{check_slurs, check_slurs_opt, convert_datetime}, utils::{check_slurs, check_slurs_opt, convert_datetime},

View file

@ -16,7 +16,6 @@ use diesel::{
PgConnection, PgConnection,
}; };
use lazy_static::lazy_static; use lazy_static::lazy_static;
use lemmy_structs::blocking;
use lemmy_db::get_database_url_from_env; use lemmy_db::get_database_url_from_env;
use lemmy_rate_limit::{rate_limiter::RateLimiter, RateLimit}; use lemmy_rate_limit::{rate_limiter::RateLimiter, RateLimit};
use lemmy_server::{ use lemmy_server::{
@ -26,6 +25,7 @@ use lemmy_server::{
websocket::chat_server::ChatServer, websocket::chat_server::ChatServer,
LemmyContext, LemmyContext,
}; };
use lemmy_structs::blocking;
use lemmy_utils::{settings::Settings, LemmyError, CACHE_CONTROL_REGEX}; use lemmy_utils::{settings::Settings, LemmyError, CACHE_CONTROL_REGEX};
use reqwest::Client; use reqwest::Client;
use std::sync::Arc; use std::sync::Arc;

View file

@ -1,7 +1,7 @@
use crate::{api::Perform, LemmyContext}; use crate::{api::Perform, LemmyContext};
use actix_web::{error::ErrorBadRequest, *}; use actix_web::{error::ErrorBadRequest, *};
use lemmy_structs::{comment::*, community::*, post::*, site::*, user::*};
use lemmy_rate_limit::RateLimit; use lemmy_rate_limit::RateLimit;
use lemmy_structs::{comment::*, community::*, post::*, site::*, user::*};
use serde::Deserialize; use serde::Deserialize;
pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimit) { pub fn config(cfg: &mut web::ServiceConfig, rate_limit: &RateLimit) {

View file

@ -3,7 +3,6 @@ use actix_web::{error::ErrorBadRequest, *};
use anyhow::anyhow; use anyhow::anyhow;
use chrono::{DateTime, NaiveDateTime, Utc}; use chrono::{DateTime, NaiveDateTime, Utc};
use diesel::PgConnection; use diesel::PgConnection;
use lemmy_structs::blocking;
use lemmy_db::{ use lemmy_db::{
comment_view::{ReplyQueryBuilder, ReplyView}, comment_view::{ReplyQueryBuilder, ReplyView},
community::Community, community::Community,
@ -14,6 +13,7 @@ use lemmy_db::{
ListingType, ListingType,
SortType, SortType,
}; };
use lemmy_structs::blocking;
use lemmy_utils::{settings::Settings, utils::markdown_to_html, LemmyError}; use lemmy_utils::{settings::Settings, utils::markdown_to_html, LemmyError};
use rss::{CategoryBuilder, ChannelBuilder, GuidBuilder, Item, ItemBuilder}; use rss::{CategoryBuilder, ChannelBuilder, GuidBuilder, Item, ItemBuilder};
use serde::Deserialize; use serde::Deserialize;

View file

@ -1,8 +1,8 @@
use crate::{version, LemmyContext}; use crate::{version, LemmyContext};
use actix_web::{body::Body, error::ErrorBadRequest, *}; use actix_web::{body::Body, error::ErrorBadRequest, *};
use anyhow::anyhow; use anyhow::anyhow;
use lemmy_structs::blocking;
use lemmy_db::site_view::SiteView; use lemmy_db::site_view::SiteView;
use lemmy_structs::blocking;
use lemmy_utils::{apub::get_apub_protocol_string, settings::Settings, LemmyError}; use lemmy_utils::{apub::get_apub_protocol_string, settings::Settings, LemmyError};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use url::Url; use url::Url;

View file

@ -1,8 +1,8 @@
use crate::LemmyContext; use crate::LemmyContext;
use actix_web::{error::ErrorBadRequest, web::Query, *}; use actix_web::{error::ErrorBadRequest, web::Query, *};
use anyhow::anyhow; use anyhow::anyhow;
use lemmy_structs::blocking;
use lemmy_db::{community::Community, user::User_}; use lemmy_db::{community::Community, user::User_};
use lemmy_structs::blocking;
use lemmy_utils::{ use lemmy_utils::{
settings::Settings, settings::Settings,
LemmyError, LemmyError,

View file

@ -9,8 +9,8 @@ use diesel::{
r2d2::{ConnectionManager, Pool}, r2d2::{ConnectionManager, Pool},
PgConnection, PgConnection,
}; };
use lemmy_structs::{comment::*, community::*, post::*, site::*, user::*, websocket::*};
use lemmy_rate_limit::RateLimit; use lemmy_rate_limit::RateLimit;
use lemmy_structs::{comment::*, community::*, post::*, site::*, user::*, websocket::*};
use lemmy_utils::{ use lemmy_utils::{
location_info, location_info,
APIError, APIError,

View file

@ -5,9 +5,9 @@ use crate::{
}; };
use actix::{Actor, Context, Handler, ResponseFuture}; use actix::{Actor, Context, Handler, ResponseFuture};
use actix_web::web; use actix_web::web;
use lemmy_structs::websocket::*;
use lemmy_db::naive_now; use lemmy_db::naive_now;
use lemmy_rate_limit::RateLimit; use lemmy_rate_limit::RateLimit;
use lemmy_structs::websocket::*;
use lemmy_utils::{ConnectionId, IPAddr, LemmyError}; use lemmy_utils::{ConnectionId, IPAddr, LemmyError};
use log::{error, info}; use log::{error, info};
use rand::Rng; use rand::Rng;