Skip to content

Commit efa43d8

Browse files
authored
fix: use first name in /poll (#9)
* fix: fix serde rename clause * fix: rectify queried field in `get-committee` request
1 parent 0dff8c1 commit efa43d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/directus.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl From<serde_json::Error> for Error {
2626
#[derive(Deserialize, Debug)]
2727
pub struct Committee {
2828
pub id: i32,
29-
#[serde(rename = "surname")]
29+
#[serde(rename = "name")]
3030
pub name: String,
3131
pub poll_count: i32,
3232
}
@@ -44,7 +44,7 @@ pub async fn get_committee() -> Result<Vec<Committee>, Error> {
4444

4545
let response = Client::new()
4646
.get(format!(
47-
"{}/items/association_memberships?fields=member.id,member.surname,member.poll_count",
47+
"{}/items/association_memberships?fields=member.id,member.name,member.poll_count",
4848
config().directus_url
4949
))
5050
.bearer_auth(&config().directus_token)

0 commit comments

Comments
 (0)