Remove middleware impl as it's noise

This commit is contained in:
Vivianne 2023-06-30 18:02:27 -07:00
parent 1ed21658e6
commit 039d1ddb1f
1 changed files with 2 additions and 8 deletions

View File

@ -33,12 +33,6 @@ struct AdminMiddleware {
pub access_token: String,
}
impl AdminMiddleware {
pub fn new(access_token: String) -> Self {
AdminMiddleware { access_token }
}
}
#[derive(Debug, Deserialize)]
#[allow(dead_code)]
struct DendriteError {
@ -73,11 +67,11 @@ impl MiddleWare for AdminMiddleware {
async fn main() {
dotenv().ok();
let token = env::var("ACCESS_TOKEN").expect("ACCESS_TOKEN is a required env setting");
let access_token = env::var("ACCESS_TOKEN").expect("ACCESS_TOKEN is a required env setting");
let instance = env::var("INSTANCE_URL").expect("INSTANCE_URL is a required env setting");
let domain = env::var("INSTANCE_DOMAIN").expect("INSTANCE_DOMAIN is a required env setting");
let middleware = AdminMiddleware::new(token);
let middleware = AdminMiddleware { access_token };
let client = Client::default(&instance);
print!("Enter local user id for {} account: @", domain);