flake reorg

This commit is contained in:
Robin Appelman 2025-05-30 23:01:05 +02:00
commit db5cef6fb7
10 changed files with 109 additions and 85 deletions

View file

@ -44,7 +44,7 @@ async fn main() -> Result<(), MainError> {
async fn get_last_demo(client: &Client, api_host: &str) -> Result<i32, MainError> {
let response: Response = client
.get(&format!("{}/api/v1/log?limit=100", api_host))
.get(format!("{}/api/v1/log?limit=100", api_host))
.send()
.await?;
let listing: LogListing = serde_json::from_str(&response.text().await?)?;
@ -85,7 +85,7 @@ async fn archive(database_url: &str, api_host: &str, log_target: &Path) -> Resul
sleep(Duration::from_millis(500)).await;
let response: Response = client
.get(&format!("{}/api/v1/log/{}", api_host, last_archived))
.get(format!("{}/api/v1/log/{}", api_host, last_archived))
.send()
.await?;
let body: Value = serde_json::from_str(&response.text().await?)?;
@ -111,7 +111,7 @@ async fn download_log(
id: i32,
) -> Result<(), MainError> {
let log_zip = client
.get(&format!("{}/logs/log_{}.log.zip", api_host, id))
.get(format!("{}/logs/log_{}.log.zip", api_host, id))
.send()
.await?
.bytes()