Reorganize use statements
This commit is contained in:
+18
-12
@@ -1,22 +1,28 @@
|
||||
use activitystreams_traits::{Actor, Object};
|
||||
use activitystreams_types::collection::OrderedCollection;
|
||||
use reqwest::Client;
|
||||
use reqwest::header::{Accept, qitem};
|
||||
use reqwest::mime::Mime;
|
||||
use reqwest::{
|
||||
Client,
|
||||
header::{Accept, qitem},
|
||||
mime::Mime
|
||||
};
|
||||
use serde_json;
|
||||
use url::Url;
|
||||
use chrono::NaiveDateTime;
|
||||
use diesel::{self, QueryDsl, RunQueryDsl, ExpressionMethods, PgConnection};
|
||||
use openssl::hash::MessageDigest;
|
||||
use openssl::pkey::{PKey, Private};
|
||||
use openssl::rsa::Rsa;
|
||||
use openssl::sign::Signer;
|
||||
use openssl::{
|
||||
hash::MessageDigest,
|
||||
pkey::{PKey, Private},
|
||||
rsa::Rsa,
|
||||
sign::Signer
|
||||
};
|
||||
|
||||
use activity_pub::{ActivityStream, Id, IntoId};
|
||||
use activity_pub::actor::{Actor as APActor, ActorType};
|
||||
use activity_pub::inbox::WithInbox;
|
||||
use activity_pub::sign;
|
||||
use activity_pub::webfinger::*;
|
||||
use activity_pub::{
|
||||
ActivityStream, Id, IntoId,
|
||||
actor::{Actor as APActor, ActorType},
|
||||
inbox::WithInbox,
|
||||
sign,
|
||||
webfinger::*
|
||||
};
|
||||
use models::instance::Instance;
|
||||
use schema::blogs;
|
||||
|
||||
|
||||
@@ -6,11 +6,15 @@ use chrono;
|
||||
use diesel::{self, PgConnection, RunQueryDsl, QueryDsl, ExpressionMethods};
|
||||
use serde_json;
|
||||
|
||||
use activity_pub::{ap_url, IntoId, PUBLIC_VISIBILTY};
|
||||
use activity_pub::actor::Actor;
|
||||
use activity_pub::object::Object;
|
||||
use models::posts::Post;
|
||||
use models::users::User;
|
||||
use activity_pub::{
|
||||
ap_url, IntoId, PUBLIC_VISIBILTY,
|
||||
actor::Actor,
|
||||
object::Object
|
||||
};
|
||||
use models::{
|
||||
posts::Post,
|
||||
users::User
|
||||
};
|
||||
use schema::comments;
|
||||
|
||||
#[derive(Queryable, Identifiable, Serialize, Clone)]
|
||||
|
||||
+9
-5
@@ -3,11 +3,15 @@ use chrono;
|
||||
use diesel::{self, PgConnection, QueryDsl, RunQueryDsl, ExpressionMethods};
|
||||
use serde_json;
|
||||
|
||||
use activity_pub::IntoId;
|
||||
use activity_pub::actor::Actor;
|
||||
use activity_pub::object::Object;
|
||||
use models::posts::Post;
|
||||
use models::users::User;
|
||||
use activity_pub::{
|
||||
IntoId,
|
||||
actor::Actor,
|
||||
object::Object
|
||||
};
|
||||
use models::{
|
||||
posts::Post,
|
||||
users::User
|
||||
};
|
||||
use schema::likes;
|
||||
|
||||
#[derive(Queryable, Identifiable)]
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
use diesel::{self, PgConnection, QueryDsl, RunQueryDsl, ExpressionMethods};
|
||||
|
||||
use models::posts::Post;
|
||||
use models::users::User;
|
||||
use models::{
|
||||
posts::Post,
|
||||
users::User
|
||||
};
|
||||
use schema::post_authors;
|
||||
|
||||
#[derive(Queryable, Identifiable, Associations)]
|
||||
|
||||
+11
-7
@@ -8,13 +8,17 @@ use diesel::dsl::any;
|
||||
use serde_json;
|
||||
|
||||
use BASE_URL;
|
||||
use activity_pub::{PUBLIC_VISIBILTY, ap_url, Id, IntoId};
|
||||
use activity_pub::actor::Actor;
|
||||
use activity_pub::object::Object;
|
||||
use models::blogs::Blog;
|
||||
use models::likes::Like;
|
||||
use models::users::User;
|
||||
use models::post_authors::PostAuthor;
|
||||
use activity_pub::{
|
||||
PUBLIC_VISIBILTY, ap_url, Id, IntoId,
|
||||
actor::Actor,
|
||||
object::Object
|
||||
};
|
||||
use models::{
|
||||
blogs::Blog,
|
||||
likes::Like,
|
||||
post_authors::PostAuthor,
|
||||
users::User
|
||||
};
|
||||
use schema::posts;
|
||||
|
||||
#[derive(Queryable, Identifiable, Serialize)]
|
||||
|
||||
+31
-22
@@ -7,33 +7,42 @@ use activitystreams_types::{
|
||||
};
|
||||
use bcrypt;
|
||||
use chrono::NaiveDateTime;
|
||||
use diesel::{self, QueryDsl, RunQueryDsl, ExpressionMethods, BelongingToDsl, PgConnection};
|
||||
use diesel::dsl::any;
|
||||
use openssl::hash::MessageDigest;
|
||||
use openssl::pkey::{PKey, Private};
|
||||
use openssl::rsa::Rsa;
|
||||
use openssl::sign;
|
||||
use reqwest::Client;
|
||||
use reqwest::header::{Accept, qitem};
|
||||
use reqwest::mime::Mime;
|
||||
use rocket::request::{self, FromRequest, Request};
|
||||
use rocket::outcome::IntoOutcome;
|
||||
use diesel::{self, QueryDsl, RunQueryDsl, ExpressionMethods, BelongingToDsl, PgConnection, dsl::any};
|
||||
use openssl::{
|
||||
hash::MessageDigest,
|
||||
pkey::{PKey, Private},
|
||||
rsa::Rsa,
|
||||
sign
|
||||
};
|
||||
use reqwest::{
|
||||
Client,
|
||||
header::{Accept, qitem},
|
||||
mime::Mime
|
||||
};
|
||||
use rocket::{
|
||||
request::{self, FromRequest, Request},
|
||||
outcome::IntoOutcome
|
||||
};
|
||||
use serde_json;
|
||||
use url::Url;
|
||||
|
||||
use BASE_URL;
|
||||
use activity_pub::{ap_url, ActivityStream, Id, IntoId};
|
||||
use activity_pub::actor::{ActorType, Actor as APActor};
|
||||
use activity_pub::inbox::{Inbox, WithInbox};
|
||||
use activity_pub::sign::{Signer, gen_keypair};
|
||||
use activity_pub::webfinger::{Webfinger, resolve};
|
||||
use activity_pub::{
|
||||
ap_url, ActivityStream, Id, IntoId,
|
||||
actor::{ActorType, Actor as APActor},
|
||||
inbox::{Inbox, WithInbox},
|
||||
sign::{Signer, gen_keypair},
|
||||
webfinger::{Webfinger, resolve}
|
||||
};
|
||||
use db_conn::DbConn;
|
||||
use models::comments::Comment;
|
||||
use models::follows::Follow;
|
||||
use models::instance::Instance;
|
||||
use models::notifications::*;
|
||||
use models::post_authors::PostAuthor;
|
||||
use models::posts::Post;
|
||||
use models::{
|
||||
comments::Comment,
|
||||
follows::Follow,
|
||||
instance::Instance,
|
||||
notifications::*,
|
||||
post_authors::PostAuthor,
|
||||
posts::Post
|
||||
};
|
||||
use schema::users;
|
||||
|
||||
pub const AUTH_COOKIE: &'static str = "user_id";
|
||||
|
||||
Reference in New Issue
Block a user