diff options
author | Dessalines <tyhou13@gmx.com> | 2020-04-24 10:04:36 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-04-24 10:04:36 -0400 |
commit | 66a2c4a2c38fdc90295c0ee2d599e0acecf8ad3f (patch) | |
tree | 92d48945d0d0f32d970b875e2ccc8c786e4a565b /server/src/apub/user.rs | |
parent | e5497edd5c12b1355c82b224111bf7ce5bb1fd1e (diff) |
Some fed fixes.
Diffstat (limited to 'server/src/apub/user.rs')
-rw-r--r-- | server/src/apub/user.rs | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/server/src/apub/user.rs b/server/src/apub/user.rs index b5a81911..acf72221 100644 --- a/server/src/apub/user.rs +++ b/server/src/apub/user.rs @@ -1,21 +1,4 @@ -use crate::apub::signatures::PublicKey; -use crate::apub::{create_apub_response, PersonExt}; -use crate::db::user::{UserForm, User_}; -use crate::{convert_datetime, naive_now}; -use activitystreams::{ - actor::{properties::ApActorProperties, Person}, - context, - ext::Extensible, - object::properties::ObjectProperties, -}; -use actix_web::body::Body; -use actix_web::web::Path; -use actix_web::HttpResponse; -use actix_web::{web, Result}; -use diesel::r2d2::{ConnectionManager, Pool}; -use diesel::PgConnection; -use failure::Error; -use serde::Deserialize; +use super::*; #[derive(Deserialize)] pub struct UserQuery { @@ -25,7 +8,8 @@ pub struct UserQuery { // Turn a Lemmy user into an ActivityPub person and return it as json. pub async fn get_apub_user( info: Path<UserQuery>, - db: web::Data<Pool<ConnectionManager<PgConnection>>>, + db: DbPoolParam, + chat_server: ChatServerParam, ) -> Result<HttpResponse<Body>, Error> { let user = User_::find_by_email_or_username(&&db.get()?, &info.user_name)?; |