diff --git a/src/gitea.rs b/src/gitea.rs index cec4784..fd17430 100644 --- a/src/gitea.rs +++ b/src/gitea.rs @@ -6,13 +6,14 @@ pub const GITEA_API_URL: &str = "https://git.exmods.org/api/v1"; // API endpoints pub fn get_releases(owner: &str, repo: &str) -> Result, String> { let client = blocking::Client::new(); - let url = format!("{}/{}/{}/releases", GITEA_API_URL, owner, repo); + let url = format!("{}/repos/{}/{}/releases", GITEA_API_URL, owner, repo); let result = client.get(&url).send(); if let Ok(resp) = result { - if let Ok(data) = resp.json::>() { + let result = resp.json::>(); + if let Ok(data) = result { return Ok(data); } else { - return Err("Invalid JSON payload".to_string()); + return Err(format!("Invalid JSON payload {}", result.err().unwrap())); } } Err("Invalid Result".to_string())