Remove unnecessary endpoint function in gallery example

This commit is contained in:
Héctor Ramón Jiménez 2025-01-27 20:47:59 +01:00
parent e1ad0910f0
commit 086b06553b
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -22,7 +22,7 @@ impl Image {
}
let response: Response = client
.get(endpoint("/images"))
.get("https://civitai.com/api/v1/images")
.query(&[
("sort", "Most Reactions"),
("period", "Week"),
@ -108,12 +108,6 @@ pub enum Size {
Thumbnail,
}
fn endpoint(path: &str) -> String {
const API_URL: &str = "https://civitai.com/api/v1";
format!("{API_URL}{path}")
}
#[derive(Debug, Clone)]
#[allow(dead_code)]
pub enum Error {