esetres 0.1.1

A self hosted file storage server.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{config, db};

pub async fn run(name: String) -> Result<(), Box<dyn std::error::Error>> {
    db::schema::Token::delete(name.clone()).await?;

    println!("{name} revoked.");

    // The user won't care if this worked

    let config = config::get();

    let client = reqwest::Client::new();

    let _ = client.post(format!("http://{}:{}/cache/invalidate", &config.ip, &config.port)).send().await;

    Ok(())
}