feat: add server list page

This commit is contained in:
2025-12-25 23:57:47 +01:00
parent e7fe00c48d
commit c07d6072fd
18 changed files with 2193 additions and 692 deletions

View File

@@ -19,14 +19,15 @@ pub async fn get_access_token() -> Result<String, Box<dyn Error>> {
let pool = db::get_pool().await?;
let tok = query!("SELECT * FROM tokens WHERE is_refresh = 0 ORDER BY expires_at DESC LIMIT 1")
.fetch_one(&pool)
.await?
.token;
.await?;
Ok(tok)
dbg!(&tok);
Ok(tok.token)
}
pub async fn get_authed_api_config() -> Result<configuration::Configuration, Box<dyn Error>> {
let mut conf = configuration::Configuration::default();
conf.bearer_access_token = Some(get_access_token().await?);
Ok(conf)
}