@@ -5,23 +5,23 @@ use crate::apis::com::atproto::server::{
55} ;
66use crate :: apis:: ApiError ;
77use crate :: auth_verifier:: UserDidAuthOptional ;
8+ use crate :: common:: env:: env_str;
89use crate :: config:: ServerConfig ;
910use crate :: db:: DbConn ;
1011use crate :: handle:: { normalize_and_validate_handle, HandleValidationContext , HandleValidationOpts } ;
1112use crate :: plc:: operations:: { create_op, CreateAtprotoOpInput } ;
1213use crate :: plc:: types:: { CompatibleOpOrTombstone , OpOrTombstone , Operation } ;
1314use crate :: repo:: aws:: s3:: S3BlobStore ;
1415use crate :: repo:: ActorStore ;
15- use crate :: { plc, SharedIdResolver } ;
1616use crate :: SharedSequencer ;
17+ use crate :: { plc, SharedIdResolver } ;
1718use aws_config:: SdkConfig ;
1819use email_address:: * ;
1920use rocket:: serde:: json:: Json ;
2021use rocket:: State ;
2122use rsky_lexicon:: com:: atproto:: server:: { CreateAccountInput , CreateAccountOutput } ;
2223use secp256k1:: { Keypair , Secp256k1 , SecretKey } ;
2324use std:: env;
24- use crate :: common:: env:: env_str;
2525
2626#[ derive( Debug , Deserialize , Serialize , Clone ) ]
2727pub struct TransformedCreateAccountInput {
@@ -68,7 +68,8 @@ pub async fn server_create_account(
6868 } = validate_inputs_for_local_pds ( cfg, id_resolver, body. into_inner ( ) , requester) . await ?;
6969
7070 // Create new actor repo TODO: Proper rollback
71- let mut actor_store = ActorStore :: new ( did. clone ( ) , S3BlobStore :: new ( did. clone ( ) , s3_config) , db) ;
71+ let mut actor_store =
72+ ActorStore :: new ( did. clone ( ) , S3BlobStore :: new ( did. clone ( ) , s3_config) , db) ;
7273 let commit = match actor_store. create_repo ( signing_key, Vec :: new ( ) ) . await {
7374 Ok ( commit) => commit,
7475 Err ( error) => {
@@ -84,7 +85,10 @@ pub async fn server_create_account(
8485 Some ( op) => {
8586 let plc_url = env_str ( "PDS_DID_PLC_URL" ) . unwrap_or ( "https://plc.directory" . to_owned ( ) ) ;
8687 let plc_client = plc:: Client :: new ( plc_url) ;
87- match plc_client. send_operation ( & did, & OpOrTombstone :: Operation ( op) ) . await {
88+ match plc_client
89+ . send_operation ( & did, & OpOrTombstone :: Operation ( op) )
90+ . await
91+ {
8892 Ok ( _) => {
8993 tracing:: info!( "Succesfully sent PLC Operation" )
9094 }
@@ -119,7 +123,7 @@ pub async fn server_create_account(
119123 invite_code,
120124 deactivated : Some ( deactivated) ,
121125 } )
122- . await
126+ . await
123127 {
124128 Ok ( res) => {
125129 ( access_jwt, refresh_jwt) = res;
@@ -272,7 +276,7 @@ pub async fn validate_inputs_for_local_pds(
272276 // Check password exists
273277 match input. password {
274278 None => return Err ( ApiError :: InvalidPassword ) ,
275- Some ( ref pass) => password = pass. clone ( )
279+ Some ( ref pass) => password = pass. clone ( ) ,
276280 } ;
277281
278282 // Get Signing Key
0 commit comments