Skip to content

Commit 623457b

Browse files
committed
return wide icons when present
1 parent e36979b commit 623457b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/rest/v4/areas.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ pub struct GetByIdRes {
103103
pub r#type: String,
104104
pub url_alias: String,
105105
pub icon: Option<String>,
106+
pub icon_wide: Option<String>,
106107
pub website_url: String,
107108
pub description: String,
108109
}
@@ -143,6 +144,11 @@ pub async fn get_by_id(id: Path<String>, pool: Data<MainPool>) -> Res<GetByIdRes
143144
.get("icon:square")
144145
.and_then(|v| v.as_str())
145146
.map(|s| s.to_string()),
147+
icon_wide: area
148+
.tags
149+
.get("icon:wide")
150+
.and_then(|v| v.as_str())
151+
.map(|s| s.to_string()),
146152
website_url: format!("https://btcmap.org/{}/{}", singular_type, url_alias),
147153
description,
148154
}))

0 commit comments

Comments
 (0)