diff options
Diffstat (limited to 'src/schema.rs')
-rw-r--r-- | src/schema.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/schema.rs b/src/schema.rs index c7a1b48..570b212 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -38,10 +38,11 @@ pub(crate) enum Email<'a> { } #[derive(serde_derive::Deserialize, Debug)] -#[serde(deny_unknown_fields)] +#[serde(deny_unknown_fields, rename_all = "kebab-case")] pub(crate) struct Person { name: String, github: String, + github_id: usize, irc: Option<String>, #[serde(default)] email: EmailField, @@ -59,6 +60,10 @@ impl Person { &self.github } + pub(crate) fn github_id(&self) -> usize { + self.github_id + } + #[allow(unused)] pub(crate) fn irc(&self) -> &str { if let Some(irc) = &self.irc { |